aboutsummaryrefslogtreecommitdiff
path: root/src/server/Controller
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-08-11 21:32:10 +0200
committerJoris Guyonvarch2015-08-11 21:32:10 +0200
commit892a7dd19a92fc18767984e624b8a5026dce61e4 (patch)
tree7d59d58d96958e91a4e9114be0effb9ec7a082a8 /src/server/Controller
parenta3bab4f2a0cc8a6a95753dc91d8e862f40c80dcc (diff)
Showing server sides generated messages from the client
Diffstat (limited to 'src/server/Controller')
-rw-r--r--src/server/Controller/SignIn.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/server/Controller/SignIn.hs b/src/server/Controller/SignIn.hs
index 1110c72..263e470 100644
--- a/src/server/Controller/SignIn.hs
+++ b/src/server/Controller/SignIn.hs
@@ -31,6 +31,8 @@ import Model.Database
import Model.User
import Model.SignIn
import Model.Json.Message
+import Model.Message.Key
+import Model.Message (getMessage)
import qualified View.Mail.SignIn as SignIn
@@ -48,11 +50,11 @@ signInAction config login =
Right _ ->
status ok200
Left _ ->
- errorResponse "Sorry, we failed to send you the sign up email."
+ errorResponse (getMessage SendEmailFail)
Nothing ->
- errorResponse "You are not authorized to sign in."
+ errorResponse (getMessage Unauthorized)
else
- errorResponse "Please enter a valid email address."
+ errorResponse (getMessage EnterValidEmail)
errorResponse :: Text -> ActionM ()
errorResponse msg = do