diff options
Diffstat (limited to 'src/server/Controller/Payment.hs')
-rw-r--r-- | src/server/Controller/Payment.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/server/Controller/Payment.hs b/src/server/Controller/Payment.hs index e94b300..432603b 100644 --- a/src/server/Controller/Payment.hs +++ b/src/server/Controller/Payment.hs @@ -18,11 +18,12 @@ import Control.Monad.IO.Class (liftIO) import Data.Text (Text) import qualified Data.Text as T +import qualified Data.Text.Lazy as TL import qualified Data.Aeson.Types as Json import qualified Secure -import Json (jsonObject, jsonError) +import Json (jsonObject) import Model.Database import qualified Model.Payment as P @@ -62,8 +63,9 @@ deletePayment paymentId = if deleted then status ok200 - else - jsonError (getMessage PaymentNotDeleted) + else do + status badRequest400 + text . TL.pack . show $ PaymentNotDeleted ) getPaymentsCount :: ActionM () |