Skip to content

Commit

Permalink
fix backend auth role missing optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
ansonjwhe committed May 3, 2024
1 parent ca38a6b commit ede20c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/controller/getAuthRoles.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const getWATIAMFromEmail = async (email) => {
const getAuthRoles = async (user_uid, email, reporter_id) => {
const watiam = await getWATIAMFromEmail(email)
const currentGoogleGroup = await getGoogleGroup(watiam)
const isAdmin = currentGoogleGroup.title === AUTH_ROLES.Administrator
const isAdmin = currentGoogleGroup?.title === AUTH_ROLES.Administrator
const isReporter = reporter_id === user_uid

return {
Expand Down

0 comments on commit ede20c3

Please sign in to comment.