From 64d7e07f355f1066b2e17c1528423f7479afe359 Mon Sep 17 00:00:00 2001 From: David Mosbach Date: Tue, 16 Jan 2024 21:40:19 +0100 Subject: [PATCH] changed user id to be their email --- app/UniWorX.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] []