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.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 ->