fix: eslint errors, switch to using maps

This commit is contained in:
Huskydog9988
2025-04-15 20:04:45 -04:00
parent e362f732e7
commit 8f429e1e56
21 changed files with 158 additions and 159 deletions

View File

@ -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)}`,
);
}
}
});
});