From 6304ef28c4e2f51fb836914c8317e8a77db536c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Sun, 3 Sep 2023 14:20:14 +0100 Subject: [PATCH] chore: Tidy up --- api.planx.uk/modules/auth/middleware.ts | 4 +++- api.planx.uk/modules/auth/strategy/google.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api.planx.uk/modules/auth/middleware.ts b/api.planx.uk/modules/auth/middleware.ts index ee11d02c86..0548197f63 100644 --- a/api.planx.uk/modules/auth/middleware.ts +++ b/api.planx.uk/modules/auth/middleware.ts @@ -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, diff --git a/api.planx.uk/modules/auth/strategy/google.ts b/api.planx.uk/modules/auth/strategy/google.ts index 10212ba2d5..8461cfd670 100644 --- a/api.planx.uk/modules/auth/strategy/google.ts +++ b/api.planx.uk/modules/auth/strategy/google.ts @@ -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); }