aboutsummaryrefslogtreecommitdiff
path: root/server/src/Controller/Payment.hs
diff options
context:
space:
mode:
authorJoris2019-10-20 21:31:57 +0200
committerJoris2019-10-20 21:31:57 +0200
commit602c52acfcfa494b07fec05c20b317b60ea8a6f3 (patch)
tree34fd9c44f82a83569822bc36eb2e0b04518e59f2 /server/src/Controller/Payment.hs
parent7aadcc97f9df0e2daccbe8a8726d8bc6c63d67f4 (diff)
downloadbudget-602c52acfcfa494b07fec05c20b317b60ea8a6f3.tar.gz
budget-602c52acfcfa494b07fec05c20b317b60ea8a6f3.tar.bz2
budget-602c52acfcfa494b07fec05c20b317b60ea8a6f3.zip
Load init data per page with AJAX
Diffstat (limited to 'server/src/Controller/Payment.hs')
-rw-r--r--server/src/Controller/Payment.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/src/Controller/Payment.hs b/server/src/Controller/Payment.hs
index ba9d1ba..30b63ff 100644
--- a/server/src/Controller/Payment.hs
+++ b/server/src/Controller/Payment.hs
@@ -1,5 +1,6 @@
module Controller.Payment
( list
+ , listPaymentCategories
, create
, edit
, delete
@@ -32,6 +33,12 @@ list =
(liftIO . Query.run $ PaymentPersistence.listActive) >>= json
)
+listPaymentCategories :: ActionM ()
+listPaymentCategories =
+ Secure.loggedAction (\_ ->
+ (liftIO . Query.run $ PaymentCategoryPersistence.list) >>= json
+ )
+
create :: CreatePaymentForm -> ActionM ()
create form =
Secure.loggedAction (\user ->