Fix edge cases with session
This commit is contained in:
parent
9e4cc555a6
commit
7bce31f5fc
@ -27,6 +27,8 @@ export const handle = (async ({ event, resolve }) => {
|
|||||||
throw redirect(302, '/admin/reviews');
|
throw redirect(302, '/admin/reviews');
|
||||||
} else {
|
} else {
|
||||||
event.cookies.delete('token');
|
event.cookies.delete('token');
|
||||||
|
const res = resolve(event);
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const res = resolve(event);
|
const res = resolve(event);
|
||||||
@ -44,6 +46,7 @@ export const handle = (async ({ event, resolve }) => {
|
|||||||
return res;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
event.cookies.delete('token');
|
event.cookies.delete('token');
|
||||||
|
throw redirect(302, '/login');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw redirect(302, '/login');
|
throw redirect(302, '/login');
|
||||||
|
Loading…
Reference in New Issue
Block a user