aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Server.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/Server.elm')
-rw-r--r--src/client/elm/Server.elm5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/elm/Server.elm b/src/client/elm/Server.elm
index 99ce938..ad6d212 100644
--- a/src/client/elm/Server.elm
+++ b/src/client/elm/Server.elm
@@ -25,7 +25,6 @@ init =
Task.map Init (Http.get usersDecoder "/api/users")
`Task.andMap` (Http.get ("id" := userIdDecoder) "/api/whoAmI")
`Task.andMap` (Http.get paymentsDecoder "/api/payments")
- `Task.andMap` (Http.get paymentsDecoder "/api/monthlyPayments")
`Task.andMap` (Http.get incomesDecoder "/api/incomes")
signIn : String -> Task Http.Error ()
@@ -33,12 +32,12 @@ signIn email =
post ("/api/signIn?email=" ++ email)
|> Task.map (always ())
-addPayment : String -> String -> PaymentFrequency -> Task Http.Error PaymentId
+addPayment : String -> String -> Frequency -> Task Http.Error PaymentId
addPayment name cost frequency =
post ("/api/payment/add?name=" ++ name ++ "&cost=" ++ cost ++ "&frequency=" ++ (toString frequency))
|> flip Task.andThen (decodeHttpValue <| "id" := paymentIdDecoder)
-deletePayment : Payment -> PaymentFrequency -> Task Http.Error ()
+deletePayment : Payment -> Frequency -> Task Http.Error ()
deletePayment payment frequency =
post ("/api/payment/delete?id=" ++ (toString payment.id))
|> Task.map (always ())