Tag comments about suboptimal implementations
This commit is contained in:
parent
d0d32a04fe
commit
ee659cb2a8
|
@ -54,7 +54,7 @@ dbUserToUser :: Monad m => Entity DBUser -> User m
|
||||||
dbUserToUser user = let id = entityToID user
|
dbUserToUser user = let id = entityToID user
|
||||||
DBUser {..} = entityVal user
|
DBUser {..} = entityVal user
|
||||||
Success (MemberData {..}) = fromJSON dBUserMemberData
|
Success (MemberData {..}) = fromJSON dBUserMemberData
|
||||||
-- Explodes if database doesn't contain needed data
|
-- XXX: Explodes if database doesn't contain needed data
|
||||||
in User
|
in User
|
||||||
{ id = pure id
|
{ id = pure id
|
||||||
, email = pure dBUserEmail
|
, email = pure dBUserEmail
|
||||||
|
@ -147,7 +147,7 @@ updateUser :: (MonadRandom m, MonadDB m, MonadEmail m, MonadError GQLError m) =>
|
||||||
UserID -> UpdateData -> m UserID
|
UserID -> UpdateData -> m UserID
|
||||||
updateUser user (UpdateData {..}) = do
|
updateUser user (UpdateData {..}) = do
|
||||||
hash <- sequence $ hashPassword <$> password
|
hash <- sequence $ hashPassword <$> password
|
||||||
-- assert stuff valid
|
-- TODO: assert stuff valid
|
||||||
verificationSecretUpdate <- maybe (pure Nothing)
|
verificationSecretUpdate <- maybe (pure Nothing)
|
||||||
(const $ Just . (DBUserEmailVerificationSecret =. ) . Just <$> genVerificationSecret) email
|
(const $ Just . (DBUserEmailVerificationSecret =. ) . Just <$> genVerificationSecret) email
|
||||||
user <- updateUserData user
|
user <- updateUserData user
|
||||||
|
|
Loading…
Reference in New Issue