diff options
author | Joris | 2015-08-29 13:30:09 +0200 |
---|---|---|
committer | Joris | 2015-08-29 13:30:09 +0200 |
commit | 6b466f616035c2fc03359d182c074f096d6b7f17 (patch) | |
tree | 47708f2e96614d71059f98c757d6a3fe88c8b923 /src/client/Main.elm | |
parent | aa7f70d172be9ef322f9a0d19d1d9d9489f9fa75 (diff) |
Showing exceeding payers
Diffstat (limited to 'src/client/Main.elm')
-rw-r--r-- | src/client/Main.elm | 6 |
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 ()) |