Commit 63f76792 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] test ok. TODO : API info <> demo users should not be able to create accounts

parent ec36f1c3
Pipeline #1260 failed with stage
......@@ -63,7 +63,7 @@ api nId (ShareTeamParams user') = do
case isRegistered of
Just _ -> pure u
Nothing -> do
_ <- newUsers [u]
_ <- newUsers [user']
pure u
fromIntegral <$> DB.shareNodeWith (ShareNodeWith_User NodeFolderShared (UserName user)) nId
......
......@@ -31,7 +31,7 @@ getUserId u = do
maybeUser <- getUserId' u
case maybeUser of
Nothing -> nodeError NoUserFound
Just u -> pure u
Just u' -> pure u'
getUserId' :: HasNodeError err
=> User
......
......@@ -44,9 +44,10 @@ newUserQuick n = do
pass <- gargPass
let u = case guessUserName n of
Just (u', _m) -> u'
Nothing -> panic "Email invalid"
Nothing -> panic "[G.D.A.U.N.newUserQuick]: Email invalid"
pure (NewUser u n (GargPassword pass))
------------------------------------------------------------------------
isEmail :: Text -> Bool
isEmail = ((==) 2) . List.length . (splitOn "@")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment