diff options
Diffstat (limited to 'src/server/Controller/Payment.hs')
-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 204794a..7e8d0a3 100644 --- a/src/server/Controller/Payment.hs +++ b/src/server/Controller/Payment.hs @@ -3,7 +3,7 @@ module Controller.Payment ( getPayments , createPayment - , deletePayment + , deleteOwnPayment ) where import Web.Scotty @@ -46,8 +46,8 @@ createPayment name cost frequency = jsonObject [("id", Json.Number . fromIntegral . keyToInt64 $ paymentId)] ) -deletePayment :: Text -> ActionM () -deletePayment paymentId = +deleteOwnPayment :: Text -> ActionM () +deleteOwnPayment paymentId = Secure.loggedAction (\user -> do deleted <- liftIO . runDb $ P.deleteOwnPayment user (textToKey paymentId) if deleted |