Skip to content

Commit

Permalink
chore: hook restructuring pt2
Browse files Browse the repository at this point in the history
  • Loading branch information
xynydev committed Apr 20, 2024
1 parent a3c8c7b commit 15f3afc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ export const handle: Handle = async ({ event, resolve }) => {
Authorization: `Bearer ${githubToken}`
}
});
const githubUser = await githubUserResponse.json();
if (githubUserResponse.ok) {
event.locals.githubUser = githubUser;
} else {
event.locals.githubUser = null;
}
event.locals.githubUser = githubUserResponse.ok ? await githubUserResponse.json() : null;

event.locals.hello = "world";

Expand Down

0 comments on commit 15f3afc

Please sign in to comment.