aboutsummaryrefslogtreecommitdiff
path: root/src/client/Main.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Main.elm')
-rw-r--r--src/client/Main.elm6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/Main.elm b/src/client/Main.elm
index badb450..57e41d4 100644
--- a/src/client/Main.elm
+++ b/src/client/Main.elm
@@ -13,6 +13,7 @@ import Json.Decode as Json
import Model exposing (Model, initialModel)
import Model.Payment exposing (Payments, paymentsDecoder)
+import Model.Payers exposing (Payers, payersDecoder)
import Model.Message exposing (messageDecoder)
import Model.Translations exposing (..)
@@ -55,7 +56,7 @@ port initView =
Just msg ->
Signal.send actions.address (SignInError msg)
Nothing ->
- Task.map2 GoPaymentView getUserName getPayments
+ Task.map3 GoPaymentView getUserName getPayments getPayers
|> flip Task.andThen (Signal.send actions.address)
|> flip Task.onError (\_ -> Signal.send actions.address GoSignInView)
@@ -65,6 +66,9 @@ getUserName = Http.get messageDecoder "/userName"
getPayments : Task Http.Error Payments
getPayments = Http.get paymentsDecoder "/payments"
+getPayers : Task Http.Error Payers
+getPayers = Http.get payersDecoder "/payments/total"
+
---------------------------------------
port serverCommunicationsPort : Signal (Task Http.RawError ())