fix: (auth) token login fix

This commit is contained in:
2024-06-15 00:05:41 -04:00
parent 643d74e29d
commit d063b0cf0d
2 changed files with 3 additions and 1 deletions

View File

@@ -118,6 +118,7 @@ async function login(email: string, password: string) {
});
appRouter.replace({ name: 'index' });
} catch (error: unknown) {
console.log(error);
if (error instanceof AppwriteException) {
if (error.type === 'user_session_already_exists') {
appRouter.replace({ name: 'index' });