From 6a0c5087f716ed6c876a666db6573491bfd3e094 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 12 Jun 2016 23:54:17 +0200 Subject: Design income form --- src/server/Main.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/server/Main.hs') diff --git a/src/server/Main.hs b/src/server/Main.hs index 5524ba7..9946961 100644 --- a/src/server/Main.hs +++ b/src/server/Main.hs @@ -11,7 +11,6 @@ import MonthlyPaymentJob (monthlyPaymentJobListener) import Data.Text (Text) import qualified Data.Text.IO as T -import Data.Time.Clock.POSIX (posixSecondsToUTCTime) import Controller.Index import Controller.SignIn @@ -63,10 +62,7 @@ main = do get "/incomes" getIncomes - post "/income" $ do - creation <- param "creation" :: ActionM Int - amount <- param "amount" :: ActionM Int - addIncome (posixSecondsToUTCTime $ (fromIntegral creation) / 1000) amount + post "/income" $ jsonData >>= addIncome delete "/income" $ do incomeId <- param "id" :: ActionM Text -- cgit v1.2.3