aboutsummaryrefslogtreecommitdiff
path: root/src/server/Controller
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-08-12 10:16:59 +0200
committerJoris Guyonvarch2015-08-12 10:16:59 +0200
commitd985e879e574c770453590791bc35352c2632d01 (patch)
tree15c4bb98b0f54e8557c6b4cbe527f5dd24cc0a9b /src/server/Controller
parent892a7dd19a92fc18767984e624b8a5026dce61e4 (diff)
Translating sign in page and mail
Diffstat (limited to 'src/server/Controller')
-rw-r--r--src/server/Controller/SignIn.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/Controller/SignIn.hs b/src/server/Controller/SignIn.hs
index 263e470..80885bf 100644
--- a/src/server/Controller/SignIn.hs
+++ b/src/server/Controller/SignIn.hs
@@ -69,18 +69,18 @@ validateSignInAction token = do
Just signIn ->
if signInIsUsed . entityVal $ signIn
then
- redirectError "The token has already been used."
+ redirectError (getMessage SignInUsed)
else
let diffTime = now `diffUTCTime` (signInCreation . entityVal $ signIn)
in if diffTime > 2 * 60 -- 2 minutes
then
- redirectError "The token has expired."
+ redirectError (getMessage SignInExpired)
else do
LoginSession.put (signInEmail . entityVal $ signIn)
liftIO . runDb . signInTokenToUsed . entityKey $ signIn
redirect "/"
Nothing ->
- redirectError "The token is invalid."
+ redirectError (getMessage SignInInvalid)
redirectError :: Text -> ActionM ()
redirectError msg =