aboutsummaryrefslogtreecommitdiff
path: root/server/src/Main.hs
diff options
context:
space:
mode:
authorJoris2019-11-06 19:44:15 +0100
committerJoris2019-11-06 19:44:15 +0100
commitf4f24158a46d8c0975f1b8813bbdbbeebad8c108 (patch)
treed0aeaa3a920caaff7408a1f6cd12b45f21cb2620 /server/src/Main.hs
parent58f6c4e25f5f20f1b608242c83786e2f13947804 (diff)
downloadbudget-f4f24158a46d8c0975f1b8813bbdbbeebad8c108.tar.gz
budget-f4f24158a46d8c0975f1b8813bbdbbeebad8c108.tar.bz2
budget-f4f24158a46d8c0975f1b8813bbdbbeebad8c108.zip
Show the payment table with server side paging
Diffstat (limited to 'server/src/Main.hs')
-rw-r--r--server/src/Main.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/src/Main.hs b/server/src/Main.hs
index b2672e4..a4d8635 100644
--- a/server/src/Main.hs
+++ b/server/src/Main.hs
@@ -41,8 +41,13 @@ main = do
S.get "/api/users"$
User.list
- S.get "/api/payments" $
- Payment.list
+ S.get "/api/deprecated/payments" $
+ Payment.deprecatedList
+
+ S.get "/api/payments" $ do
+ page <- S.param "page"
+ perPage <- S.param "perPage"
+ Payment.list page perPage
S.post "/api/payment" $
S.jsonData >>= Payment.create