diff options
author | Joris Guyonvarch | 2015-08-11 21:32:10 +0200 |
---|---|---|
committer | Joris Guyonvarch | 2015-08-11 21:32:10 +0200 |
commit | 892a7dd19a92fc18767984e624b8a5026dce61e4 (patch) | |
tree | 7d59d58d96958e91a4e9114be0effb9ec7a082a8 /src/server/Controller | |
parent | a3bab4f2a0cc8a6a95753dc91d8e862f40c80dcc (diff) |
Showing server sides generated messages from the client
Diffstat (limited to 'src/server/Controller')
-rw-r--r-- | src/server/Controller/SignIn.hs | 8 |
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 |