1
家伙我有点谟得到会话的用户ID,我需要从Session extrat用户的德ID。如何在(耶索德/哈斯克尔项目
我不能把它放在一个文本/诠释,因为它说,会议进行的键(SQL关键我认为)我怎么能转换器具它INT在其他方法使用从我的项目
我试图做它从会话恢复的ID
getInicioR :: Handler Html
getInicioR = do
uid <- lookupSession "_ID"
user <- runDB $ get404 uid
显示以下错误消息:
Couldn't match expected type ‘Key t0’ with actual type ‘Maybe Text’
In the first argument of ‘get404’, namely ‘uid’
In the second argument of ‘($)’, namely ‘get404 uid’