yesod-forms

How get the user ID from the Session at (Yesod / Haskell Project

二次信任 提交于 2019-12-11 08:17:27
问题 guys i got a little projet and i need to extrat de ID of the user from the Session. I can't put it in a Text/Int because it says that the Session carry an Key (Sql Key i think) how can i converte it to Int to use in other methods from my project I Tried to do it to recover the ID from session getInicioR :: Handler Html getInicioR = do uid <- lookupSession "_ID" user <- runDB $ get404 uid Shows the follow error message: Couldn't match expected type ‘Key t0’ with actual type ‘Maybe Text’ In the