Delete admin
Some checks failed
Build frontend / build (push) Failing after 1m20s

This commit is contained in:
Rahaf
2026-06-10 19:50:49 +03:00
parent 34da1314d4
commit 71b1a71904
21 changed files with 128 additions and 4940 deletions

View File

@ -126,11 +126,7 @@ export default function LoginPage() {
}
}
const userRole = AuthService.isAdmin()
? "admin"
: AuthService.isOwner()
? "owner"
: "customer";
const userRole = AuthService.isOwner() ? "owner" : "customer";
console.log("[Login] User role:", userRole);
setIsSuccess(true);
@ -139,11 +135,7 @@ export default function LoginPage() {
});
setTimeout(() => {
if (userRole === "admin") {
router.push("/admin");
} else {
router.push("/");
}
router.push("/");
}, 1500);
} else if (result.status === 206) {
console.log("[Login] 206 — OTP required");