This commit is contained in:
@@ -5,7 +5,7 @@ import { auth } from '$lib/server/auth';
|
||||
|
||||
export const load: PageServerLoad = (event) => {
|
||||
if (!event.locals.user) {
|
||||
return redirect(302, '/auth/login');
|
||||
throw redirect(302, '/auth/login');
|
||||
}
|
||||
return { user: event.locals.user };
|
||||
};
|
||||
@@ -15,6 +15,6 @@ export const actions: Actions = {
|
||||
await auth.api.signOut({
|
||||
headers: event.request.headers
|
||||
});
|
||||
return redirect(302, '/auth/login');
|
||||
throw redirect(302, '/auth/login');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user