Ecrão das ausências
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ export const handle: Handle = async ({ event, resolve }) => {
|
||||
const path = event.url.pathname;
|
||||
|
||||
// Route protection
|
||||
if (path.startsWith('/admin')) {
|
||||
if (path.startsWith('/admin') || path.startsWith('/super')) {
|
||||
if (!event.locals.user) {
|
||||
throw redirect(303, `/login?redirectTo=${encodeURIComponent(path)}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user