diff options
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") |