-
-
Save mightybyte/3723262 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
createUser :: Text -- ^ Username | |
-> ByteString -- ^ Password | |
-> Handler b (AuthManager b) (Either String AuthUser) | |
createUser "" _ = return $ Left "Username cannot be empty" | |
createUser unm pwd = withBackend $ \r -> do | |
u <- liftIO $ buildAuthUser r unm pwd | |
return $ Right u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment