diff options
author | Joris | 2015-09-04 09:52:20 +0200 |
---|---|---|
committer | Joris | 2015-09-04 09:52:20 +0200 |
commit | c1f44a5890fbb26faf6f17c676662ea1bd495f2e (patch) | |
tree | f158bdef5bd985a9b11d46d12878d566268cf6cc /src/server/Controller | |
parent | 889df8caf04de5f10a9e623bab3e502e9573159d (diff) |
Adding paging (need some fixes)
Diffstat (limited to 'src/server/Controller')
-rw-r--r-- | src/server/Controller/Payment.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/Controller/Payment.hs b/src/server/Controller/Payment.hs index dc1083e..271d970 100644 --- a/src/server/Controller/Payment.hs +++ b/src/server/Controller/Payment.hs @@ -25,10 +25,10 @@ import Model.Json.Number import Model.Message import Model.Message.Key (Key(PaymentNotDeleted)) -getPaymentsAction :: ActionM () -getPaymentsAction = +getPaymentsAction :: Int -> Int -> ActionM () +getPaymentsAction page perPage = Secure.loggedAction (\_ -> do - payments <- liftIO $ runDb getPayments + payments <- liftIO $ runDb (getPayments page perPage) json payments ) |