diff options
author | Joris | 2019-10-20 21:31:57 +0200 |
---|---|---|
committer | Joris | 2019-10-20 21:31:57 +0200 |
commit | 602c52acfcfa494b07fec05c20b317b60ea8a6f3 (patch) | |
tree | 34fd9c44f82a83569822bc36eb2e0b04518e59f2 /server/src/Controller/Payment.hs | |
parent | 7aadcc97f9df0e2daccbe8a8726d8bc6c63d67f4 (diff) |
Load init data per page with AJAX
Diffstat (limited to 'server/src/Controller/Payment.hs')
-rw-r--r-- | server/src/Controller/Payment.hs | 7 |
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 -> |