Skip to content

Commit

Permalink
chore: Tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Sep 11, 2023
1 parent f34f652 commit 6304ef2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion api.planx.uk/modules/auth/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ export const useRoleAuth: UseRoleAuth =

if (!isAuthorised) {
console.error(
`Authentication error: User ${userId} does have have any of the roles ${authRoles} which are required to access ${req.path}`,
`Authentication error: User ${userId} does have have any of the roles [${authRoles.join(
", ",
)}] which are required to access ${req.path}`,
);
return next({
status: 403,
Expand Down
2 changes: 1 addition & 1 deletion api.planx.uk/modules/auth/strategy/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const googleStrategy = new GoogleStrategy(
if (!jwt) {
return done({
status: 404,
message: `User (${email}) not found.Do you need to log in to a different Google Account?`,
message: `User (${email}) not found. Do you need to log in to a different Google Account?`,
} as any);
}

Expand Down

0 comments on commit 6304ef2

Please sign in to comment.