diff options
author | Joris | 2016-01-02 20:49:24 +0100 |
---|---|---|
committer | Joris | 2016-01-02 20:49:24 +0100 |
commit | 35493d8ec353f90a6ca67e2aedb702684e0abafa (patch) | |
tree | a1c6eba2cde84b89e7554618479d7eab0ef7c480 /src/client/elm/InitViewAction.elm | |
parent | 302a2e798f10e61c129753a2bd11634420c1f1a1 (diff) |
Moving initViewAction to serverCommunication module
Diffstat (limited to 'src/client/elm/InitViewAction.elm')
-rw-r--r-- | src/client/elm/InitViewAction.elm | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/client/elm/InitViewAction.elm b/src/client/elm/InitViewAction.elm deleted file mode 100644 index 52ae08d..0000000 --- a/src/client/elm/InitViewAction.elm +++ /dev/null @@ -1,25 +0,0 @@ -module InitViewAction - ( initViewAction - ) where - -import Task exposing (..) -import Http -import Json.Decode as Json exposing ((:=)) - -import Effects exposing (Never) - -import Model.Action exposing (..) -import Model.Payment exposing (Payments, paymentsDecoder) -import Model.Payer exposing (Payers, payersDecoder) -import Model.User exposing (Users, usersDecoder, UserId, userIdDecoder) - -initViewAction = Task.onError loggedInView (always <| Task.succeed GoSignInView) - -loggedInView : Task Http.Error Action -loggedInView = - Task.map GoLoggedInView (Http.get usersDecoder "/users") - `Task.andMap` (Http.get ("id" := userIdDecoder) "/whoAmI") - `Task.andMap` (Http.get paymentsDecoder "/monthlyPayments") - `Task.andMap` (Http.get paymentsDecoder "/payments") - `Task.andMap` (Http.get ("number" := Json.int) "/payments/count") - `Task.andMap` (Http.get payersDecoder "/payers") |