aboutsummaryrefslogtreecommitdiff
path: root/server/src/Controller/Payment.hs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/Controller/Payment.hs')
-rw-r--r--server/src/Controller/Payment.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/server/src/Controller/Payment.hs b/server/src/Controller/Payment.hs
index 4edbf6a..fb7fcb2 100644
--- a/server/src/Controller/Payment.hs
+++ b/server/src/Controller/Payment.hs
@@ -12,8 +12,6 @@ import Web.Scotty
import Common.Model (CreatePayment (..),
EditPayment (..), PaymentId,
User (..))
-
-import qualified Json
import qualified Model.Query as Query
import qualified Persistence.Payment as PaymentPersistence
import qualified Persistence.PaymentCategory as PaymentCategoryPersistence
@@ -34,7 +32,7 @@ create createPayment@(CreatePayment name cost date category frequency) =
(liftIO . Query.run $ do
PaymentCategoryPersistence.save name category
PaymentPersistence.create (_user_id user) name cost date frequency
- ) >>= Json.jsonId
+ ) >>= json
Just validationError ->
do
status Status.badRequest400