frontend redirects
This commit is contained in:
@@ -16,7 +16,7 @@ export async function load({ cookies, fetch, locals }) {
|
||||
if (!response.ok) {
|
||||
// Clear the invalid JWT cookie
|
||||
cookies.delete('jwt', { path: '/' });
|
||||
throw redirect(302, `${base}/auth/login?next=${base}admin/users/`);
|
||||
throw redirect(302, `${base}/auth/login?next=${base}/auth/admin/users/`);
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
@@ -44,6 +44,6 @@ export async function load({ cookies, fetch, locals }) {
|
||||
// In case of any error, clear the JWT cookie
|
||||
cookies.delete('jwt', { path: '/' });
|
||||
|
||||
throw redirect(302, `${base}/auth/login?next=${base}/admin/users/`);
|
||||
throw redirect(302, `${base}/auth/login?next=${base}/auth/admin/users/`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user