diff options
Diffstat (limited to 'src/server/Main.hs')
-rw-r--r-- | src/server/Main.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/Main.hs b/src/server/Main.hs index 27908b4..c3d285e 100644 --- a/src/server/Main.hs +++ b/src/server/Main.hs @@ -13,6 +13,7 @@ import Controller.Payment import Controller.User import Model.Database (runMigrations) +import Model.Frequency import Config @@ -54,10 +55,14 @@ main = do perPage <- param "perPage" :: ActionM Int getPaymentsAction page perPage + get "/monthlyPayments" $ do + getMonthlyPaymentsAction + post "/payment/add" $ do name <- param "name" :: ActionM Text cost <- param "cost" :: ActionM Int - createPaymentAction name cost + frequency <- param "frequency" :: ActionM Frequency + createPaymentAction name cost frequency post "/payment/delete" $ do paymentId <- param "id" :: ActionM Text |