aboutsummaryrefslogtreecommitdiff
path: root/server/src/Controller
diff options
context:
space:
mode:
authorJoris2018-10-30 18:04:58 +0100
committerJoris2018-10-30 18:04:58 +0100
commit50fb8fa48d1c4881da20b4ecf6d68a772301e713 (patch)
tree99c30c644d40664a9a7bb4a27e838d7cccda7a5f /server/src/Controller
parent40b4994797a797b1fa86cafda789a5c488730c6d (diff)
Update table when adding or removing a payment
Diffstat (limited to 'server/src/Controller')
-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