Skip to content

Commit

Permalink
await redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
McPizza0 committed Feb 21, 2024
1 parent 4368f07 commit 86b582f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions server/api/auth/github/callback.get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default eventHandler(async (event) => {
" 🔥 redirecting to",
`/o/${existingUser.username.toLocaleLowerCase()}`
);
return sendRedirect(
return await sendRedirect(
event,
`/o/${existingUser.username.toLocaleLowerCase()}`
);
Expand Down Expand Up @@ -78,7 +78,7 @@ export default eventHandler(async (event) => {
"Set-Cookie",
lucia.createSessionCookie(session.id).serialize()
);
return sendRedirect(event, `/o/${githubUser.login.toLowerCase()}`);
return await sendRedirect(event, `/o/${githubUser.login.toLowerCase()}`);
} catch (e) {
if (
e instanceof OAuth2RequestError &&
Expand Down
2 changes: 1 addition & 1 deletion server/api/auth/github/index.get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export default defineEventHandler(async (event) => {
maxAge: 60 * 10,
sameSite: "lax",
});
return sendRedirect(event, url.toString());
return await sendRedirect(event, url.toString());
});

0 comments on commit 86b582f

Please sign in to comment.