redirect to home if error

This commit is contained in:
ed barz 2023-06-01 11:26:36 +02:00
parent f6c9a4e117
commit b35e8d4131
1 changed files with 5 additions and 2 deletions

View File

@ -38,13 +38,16 @@ export const actions = {
});
throw redirect(301,'/profile');
}
} else {
throw redirect(301,'/');
}
/*
const error = await res.json();
if (error){
const encodedMessage = encodeURIComponent(error.error);
throw redirect(301,'/login?error='+ encodedMessage);
}
*/
},
};