diff --git a/app/UniWorX.hs b/app/UniWorX.hs index 464b209..974fb18 100644 --- a/app/UniWorX.hs +++ b/app/UniWorX.hs @@ -67,7 +67,7 @@ instance UserData (Entity User) (Map Text Text) where data Scope (Entity User) = ID | Profile deriving (Show, Read, Eq) readScope = read showScope = show - userScope (Entity uID _) ID = M.singleton "id" . T.pack $ show uID + userScope (Entity _ User{..}) ID = M.singleton "id" userEmail userScope (Entity _ User{..}) Profile = M.fromList [("name", userName), ("email", userEmail)] lookupUser email _ = runDB $ do user <- selectList [UserEmail ==. email] []