diff options
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 |