diff options
author | Joris | 2018-10-31 19:03:19 +0100 |
---|---|---|
committer | Joris | 2018-10-31 19:03:19 +0100 |
commit | 86957359ecf54c205aee1c09e151172c327e987a (patch) | |
tree | 57232850550209d491e74498fddd500b59bfd1e3 /server/src/Controller | |
parent | b5244184920b4d7a8d64eada2eca21e9a6ea2df9 (diff) |
Various fixes
Diffstat (limited to 'server/src/Controller')
-rw-r--r-- | server/src/Controller/Index.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/Controller/Index.hs b/server/src/Controller/Index.hs index f942540..0b276d3 100644 --- a/server/src/Controller/Index.hs +++ b/server/src/Controller/Index.hs @@ -6,6 +6,7 @@ module Controller.Index ) where import Control.Monad.IO.Class (liftIO) +import qualified Data.Aeson as Json import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Encoding as TE @@ -60,7 +61,7 @@ askSignIn conf (SignIn email) = ] maybeSentMail <- liftIO . SendMail.sendMail conf $ SignIn.mail conf user url [email] case maybeSentMail of - Right _ -> textKey ok200 Msg.SignIn_EmailSent + Right _ -> S.json (Json.String . Msg.get $ Msg.SignIn_EmailSent) Left _ -> textKey badRequest400 Msg.SignIn_EmailSendFail Nothing -> textKey badRequest400 Msg.Secure_Unauthorized else textKey badRequest400 Msg.SignIn_EmailInvalid |