aboutsummaryrefslogtreecommitdiff
path: root/server/src/Main.hs
diff options
context:
space:
mode:
authorJoris2019-08-10 14:53:41 +0200
committerJoris2019-08-10 14:53:41 +0200
commitfb8f0fe577e28dae69903413b761da50586e0099 (patch)
tree91149151facf24348ce1f9798edd5c70be795d11 /server/src/Main.hs
parent3943c50d5320f7137bd5acec4485dd56a2aa52b3 (diff)
downloadbudget-fb8f0fe577e28dae69903413b761da50586e0099.tar.gz
budget-fb8f0fe577e28dae69903413b761da50586e0099.tar.bz2
budget-fb8f0fe577e28dae69903413b761da50586e0099.zip
Remove payment category if unused after a payment is deleted
Diffstat (limited to 'server/src/Main.hs')
-rw-r--r--server/src/Main.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/Main.hs b/server/src/Main.hs
index 745071c..0ccf5e2 100644
--- a/server/src/Main.hs
+++ b/server/src/Main.hs
@@ -35,21 +35,21 @@ main = do
S.jsonData >>= Payment.create
S.put "/payment" $
- S.jsonData >>= Payment.editOwn
+ S.jsonData >>= Payment.edit
S.delete "/payment/:id" $ do
paymentId <- S.param "id"
- Payment.deleteOwn paymentId
+ Payment.delete paymentId
S.post "/income" $
S.jsonData >>= Income.create
S.put "/income" $
- S.jsonData >>= Income.editOwn
+ S.jsonData >>= Income.edit
S.delete "/income/:id" $ do
incomeId <- S.param "id"
- Income.deleteOwn incomeId
+ Income.delete incomeId
S.post "/category" $
S.jsonData >>= Category.create