mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-16 01:31:19 +10:00
fix: eslint errors, switch to using maps
This commit is contained in:
@ -13,13 +13,14 @@ export default defineNitroPlugin((nitro) => {
|
||||
|
||||
switch (error.statusCode) {
|
||||
case 401:
|
||||
case 403:
|
||||
case 403: {
|
||||
const user = await sessionHandler.getSession(event);
|
||||
if (user) break;
|
||||
return sendRedirect(
|
||||
event,
|
||||
`/auth/signin?redirect=${encodeURIComponent(event.path)}`
|
||||
`/auth/signin?redirect=${encodeURIComponent(event.path)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user