changed user id to be their email

This commit is contained in:
David Mosbach 2024-01-16 21:40:19 +01:00
parent 8b1c3f090b
commit 64d7e07f35

View File

@ -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] []