diff options
Diffstat (limited to 'src/server/Controller')
-rw-r--r-- | src/server/Controller/Payment.hs | 5 |
1 files changed, 3 insertions, 2 deletions
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 () |