Skip to content

Commit

Permalink
chore: fix cognitive load from the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Matheus-Aguilar committed Jun 19, 2024
1 parent 5a2663f commit 093cc00
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions node/directives/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ export const validateAdminToken = async (

if (authUser?.audience === 'admin') {
const hasAdminPermissions = await lm.getUserAdminPermissions(
authUser?.account,
authUser?.id
authUser.account,
authUser.id
)

if (hasAdminPermissions) {
hasValidAdminToken = true
}
hasValidAdminToken = hasAdminPermissions
}
} catch (err) {
// noop so we leave hasValidAdminToken as false
Expand Down

0 comments on commit 093cc00

Please sign in to comment.