diff options
author | Joris | 2015-11-01 19:47:24 +0100 |
---|---|---|
committer | Joris | 2015-11-01 19:47:24 +0100 |
commit | 51d1ff2273315ad1270794499d0c49e8fb99aba5 (patch) | |
tree | 8a3027d9fe2865731e0111989bc84eaea1591270 /src/server/Controller/Payment.hs | |
parent | f76aaedd794f15d9f049f53a081710b9565fb8b1 (diff) |
Store the sign in token instead of the login in the session cookie
Diffstat (limited to 'src/server/Controller/Payment.hs')
-rw-r--r-- | src/server/Controller/Payment.hs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/server/Controller/Payment.hs b/src/server/Controller/Payment.hs index ffb575c..d233aa2 100644 --- a/src/server/Controller/Payment.hs +++ b/src/server/Controller/Payment.hs @@ -10,22 +10,20 @@ module Controller.Payment import Web.Scotty -import Network.HTTP.Types.Status (ok200, badRequest400) +import Network.HTTP.Types.Status (ok200) import Database.Persist import Control.Monad.IO.Class (liftIO) import Data.Text (Text) -import qualified Data.Aeson.Types as Json import qualified Secure -import Json (jsonObject) +import Json (jsonError) import Model.Database import qualified Model.Payment as P -import qualified Model.Payer as Payer import Model.Frequency import Model.Json.Number import qualified Model.Json.PaymentId as JP @@ -58,9 +56,8 @@ deletePayment paymentId = if deleted then status ok200 - else do - status badRequest400 - jsonObject [("error", Json.String $ getMessage PaymentNotDeleted)] + else + jsonError (getMessage PaymentNotDeleted) ) getPaymentsCount :: ActionM () |