From 24633871359ec9fbd63fdfebf79a6351b2792f77 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 6 Sep 2015 00:05:50 +0200 Subject: Can add monthly payments, not visible at the moment though, just the count is printed --- src/server/Main.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/server/Main.hs') 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 -- cgit v1.2.3