diff options
Diffstat (limited to 'src/server/Controller/SignIn.hs')
-rw-r--r-- | src/server/Controller/SignIn.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/Controller/SignIn.hs b/src/server/Controller/SignIn.hs index 40cf474..4f41c6e 100644 --- a/src/server/Controller/SignIn.hs +++ b/src/server/Controller/SignIn.hs @@ -18,6 +18,7 @@ import qualified Data.Text as T import qualified Data.Text.Lazy as TL import qualified Data.Text.Encoding as TE import Data.Time.Clock (getCurrentTime, diffUTCTime) +import qualified Data.Aeson.Types as Json import qualified LoginSession @@ -30,10 +31,11 @@ import Text.Email.Validate (isValid) import Model.Database import Model.User import Model.SignIn -import Model.Json.Message import Model.Message.Key import Model.Message (getMessage) +import Json (jsonObject) + import qualified View.Mail.SignIn as SignIn signInAction :: Config -> Text -> ActionM () @@ -59,7 +61,7 @@ signInAction config login = errorResponse :: Text -> ActionM () errorResponse msg = do status badRequest400 - json (Message msg) + jsonObject [("error", Json.String msg)] validateSignInAction :: Config -> Text -> ActionM () validateSignInAction config token = do |