Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
albinmedoc committed Dec 2, 2024
1 parent c3a9b59 commit fc4f9db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/routes/account/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export const load: PageServerLoad = async ({ locals, request }) => {
redirect(302, `/login?ref=/account`);
}

const isProxyUser = env.HEADER_AUTH_ENABLED == "true" && !!request.headers.get(env.HEADER_USERNAME);
const isProxyUser =
env.HEADER_AUTH_ENABLED && env.HEADER_AUTH_ENABLED == "true" && !!request.headers.get(env.HEADER_USERNAME);

return {
user,
Expand Down
2 changes: 1 addition & 1 deletion src/routes/login/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const load: PageServerLoad = async ({ locals, request, cookies }) => {
}

/* Header authentication */
if (env.HEADER_AUTH_ENABLED == "true") {
if (env.HEADER_AUTH_ENABLED && env.HEADER_AUTH_ENABLED == "true") {
const username = request.headers.get(env.HEADER_USERNAME);
if (username) {
let user = await client.user.findUnique({
Expand Down

0 comments on commit fc4f9db

Please sign in to comment.