mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-22 06:17:29 +08:00
feat: use middleware to auth
This commit is contained in:
@@ -27,11 +27,6 @@ function LoginPageClient() {
|
||||
});
|
||||
|
||||
if (res.ok) {
|
||||
// 保存密码以供后续请求使用
|
||||
if (typeof window !== 'undefined') {
|
||||
localStorage.setItem('password', password);
|
||||
}
|
||||
|
||||
const redirect = searchParams.get('redirect') || '/';
|
||||
router.replace(redirect);
|
||||
} else if (res.status === 401) {
|
||||
|
||||
Reference in New Issue
Block a user