diff options
author | Joris Guyonvarch | 2015-08-12 10:16:59 +0200 |
---|---|---|
committer | Joris Guyonvarch | 2015-08-12 10:16:59 +0200 |
commit | d985e879e574c770453590791bc35352c2632d01 (patch) | |
tree | 15c4bb98b0f54e8557c6b4cbe527f5dd24cc0a9b /src/server/Controller | |
parent | 892a7dd19a92fc18767984e624b8a5026dce61e4 (diff) |
Translating sign in page and mail
Diffstat (limited to 'src/server/Controller')
-rw-r--r-- | src/server/Controller/SignIn.hs | 6 |
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 = |