From e10531ba4e60c8709088798763ae3bae6608f9c9 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 6 Sep 2015 12:39:03 +0200 Subject: Show montly payments with an expandable mechanism --- src/server/Controller/Payment.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/server/Controller') diff --git a/src/server/Controller/Payment.hs b/src/server/Controller/Payment.hs index 7944ecd..25d3261 100644 --- a/src/server/Controller/Payment.hs +++ b/src/server/Controller/Payment.hs @@ -24,6 +24,7 @@ import Model.Payment import Model.Frequency import Model.Json.Message import Model.Json.Number +import qualified Model.Json.PaymentId as JP import Model.Message import Model.Message.Key (Key(PaymentNotDeleted)) @@ -42,8 +43,8 @@ getMonthlyPaymentsAction = createPaymentAction :: Text -> Int -> Frequency -> ActionM () createPaymentAction name cost frequency = Secure.loggedAction (\user -> do - _ <- liftIO . runDb $ createPayment (entityKey user) name cost frequency - status ok200 + paymentId <- liftIO . runDb $ createPayment (entityKey user) name cost frequency + json (JP.PaymentId paymentId) ) deletePaymentAction :: Text -> ActionM () -- cgit v1.2.3