aboutsummaryrefslogtreecommitdiff
path: root/server/src/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/Controller')
-rw-r--r--server/src/Controller/Index.hs3
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