AskPasswordRecovery: user -> login.
This commit is contained in:
parent
0dce7e5762
commit
f9a471c580
@ -350,11 +350,11 @@ handleAction = case _ of
|
||||
AI.AskPasswordRecovery e -> case e of
|
||||
Left email -> do
|
||||
message <- H.liftEffect $ AuthD.serialize $
|
||||
AuthD.MkAskPasswordRecovery { user: Nothing, email: Just (Email.Email email) }
|
||||
AuthD.MkAskPasswordRecovery { login: Nothing, email: Just (Email.Email email) }
|
||||
H.tell _ws_auth unit (WS.ToSend message)
|
||||
Right login -> do
|
||||
message <- H.liftEffect $ AuthD.serialize $
|
||||
AuthD.MkAskPasswordRecovery { user: (Just login), email: Nothing }
|
||||
AuthD.MkAskPasswordRecovery { login: (Just login), email: Nothing }
|
||||
H.tell _ws_auth unit (WS.ToSend message)
|
||||
AI.PasswordRecovery login token pass -> do
|
||||
message <- H.liftEffect $ AuthD.serialize $ AuthD.MkPasswordRecovery
|
||||
|
@ -70,11 +70,11 @@ codecValidateUser
|
||||
{- NOTE: "user" attribute for both PasswordRecovery and AskPasswordRecovery could be UserID,
|
||||
but they'll be used as login since the user has to type it. -}
|
||||
{- 3 -}
|
||||
type AskPasswordRecovery = { user :: Maybe String, email :: Maybe Email.Email }
|
||||
type AskPasswordRecovery = { login :: Maybe String, email :: Maybe Email.Email }
|
||||
codecAskPasswordRecovery ∷ CA.JsonCodec AskPasswordRecovery
|
||||
codecAskPasswordRecovery
|
||||
= CA.object "AskPasswordRecovery"
|
||||
(CAR.record { user: CAR.optional CA.string, email: CAR.optional Email.codec })
|
||||
(CAR.record { login: CAR.optional CA.string, email: CAR.optional Email.codec })
|
||||
|
||||
{- 4 -}
|
||||
type PasswordRecovery = { user :: String
|
||||
|
Loading…
Reference in New Issue
Block a user