aboutsummaryrefslogtreecommitdiff
path: root/src/server/Main.hs
diff options
context:
space:
mode:
authorJoris2016-06-12 23:54:17 +0200
committerJoris2016-06-12 23:54:17 +0200
commit6a0c5087f716ed6c876a666db6573491bfd3e094 (patch)
treebf439109143c7a1749c2661fc8b805b83a993027 /src/server/Main.hs
parent38896af4281d2e191cbde15836a23e4c0274fff6 (diff)
downloadbudget-6a0c5087f716ed6c876a666db6573491bfd3e094.tar.gz
budget-6a0c5087f716ed6c876a666db6573491bfd3e094.tar.bz2
budget-6a0c5087f716ed6c876a666db6573491bfd3e094.zip
Design income form
Diffstat (limited to 'src/server/Main.hs')
-rw-r--r--src/server/Main.hs6
1 files changed, 1 insertions, 5 deletions
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