Skip to content

Commit 54fe259

Browse files
committed
Update README
1 parent f7af772 commit 54fe259

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ instance authenticatableUser :: Authenticatable Pool User where
140140
authenticate = do
141141
{ http } <- askRaw
142142
case lookup "authorization" $ requestHeaders http of
143-
Nothing -> throwError $ error "unauthorized"
143+
Nothing -> pure Nothing
144144
Just x -> do
145145
pool <- askExtra
146-
liftAff $ withPool (selectUserFromToken x) pool
146+
liftAff $ Just <$> withPool (selectUserFromToken x) pool
147147
```
148148

149149
Then, define request handlers with `Auth`.

0 commit comments

Comments
 (0)