Skip to content

Commit 01ad3f3

Browse files
committed
refactor: Cosmetic change from (maybe mempty) to foldMap in checkForErrors
1 parent 1db9fee commit 01ad3f3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/PostgREST/Auth/Jwt.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ checkForErrors time audMatches =
9494
else
9595
mempty
9696

97-
claim key parseError checkParsed = maybe (pure parseError) (maybe mempty checkParsed) . parseMaybe (.:? key)
98-
97+
claim key parseError checkParsed = maybe (pure parseError) (foldMap checkParsed) . parseMaybe (.:? key)
9998

10099
-- | Receives the JWT secret and audience (from config) and a JWT and returns a
101100
-- JSON object of JWT claims.

0 commit comments

Comments
 (0)