corrected redirects

This commit is contained in:
Alex
2025-02-23 12:27:43 +01:00
parent c23a6a6b5f
commit 577e0fe2f7

View File

@@ -17,6 +17,9 @@ export async function load({ locals }) {
if (!locals.user) {
throw redirect(302, `/auth/login?next=/auth/admin/users`);
}
if (locals.user.role_id === 0) {
throw redirect(302, `/auth/about/${locals.user.id}`);
}
}
/** @type {import('./$types').Actions} */