mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-03 00:29:10 +00:00
save
This commit is contained in:
@@ -69,8 +69,6 @@ export default function LoginForm({ redirect }: LoginFormProps) {
|
||||
if (res && res.status === 200) {
|
||||
setError(null);
|
||||
|
||||
console.log(res)
|
||||
|
||||
if (res.data?.data?.emailVerificationRequired) {
|
||||
router.push("/auth/verify-email");
|
||||
return;
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
import { GetUserResponse } from "@server/routers/user";
|
||||
import { verifySession } from "./verifySession";
|
||||
|
||||
export async function isValidUser(): Promise<GetUserResponse | null> {
|
||||
const user = await verifySession();
|
||||
|
||||
if (!user) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!user.emailVerified) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return user;
|
||||
}
|
||||
Reference in New Issue
Block a user