feature - tested email verification flow

This commit is contained in:
James Wyndham 2024-06-05 16:15:13 +08:00
parent bd6ca82bb3
commit bde770bceb
1 changed files with 3 additions and 0 deletions

View File

@ -135,6 +135,9 @@ export async function login(formData: { email: string; password: string }) {
return { success: true, error: "Failed to log in", token: token, data: data };
} catch (error) {
console.log(error)
if ((error as any).status == 403) {
await pb.collection('user').requestVerification(email);
}
return JSON.parse(JSON.stringify(error))
}
}