aboutsummaryrefslogtreecommitdiff
path: root/src/server/Controller
diff options
context:
space:
mode:
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 =