Tag comments about suboptimal implementations

This commit is contained in:
Saku Laesvuori 2023-09-17 16:39:41 +03:00
parent d0d32a04fe
commit ee659cb2a8
Signed by: slaesvuo
GPG Key ID: 257D284A2A1D3A32
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ dbUserToUser :: Monad m => Entity DBUser -> User m
dbUserToUser user = let id = entityToID user
DBUser {..} = entityVal user
Success (MemberData {..}) = fromJSON dBUserMemberData
-- Explodes if database doesn't contain needed data
-- XXX: Explodes if database doesn't contain needed data
in User
{ id = pure id
, email = pure dBUserEmail
@ -147,7 +147,7 @@ updateUser :: (MonadRandom m, MonadDB m, MonadEmail m, MonadError GQLError m) =>
UserID -> UpdateData -> m UserID
updateUser user (UpdateData {..}) = do
hash <- sequence $ hashPassword <$> password
-- assert stuff valid
-- TODO: assert stuff valid
verificationSecretUpdate <- maybe (pure Nothing)
(const $ Just . (DBUserEmailVerificationSecret =. ) . Just <$> genVerificationSecret) email
user <- updateUserData user