From bb316286b0859b5648c61f44c88399f4c1aad9cd Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 2 Jan 2016 19:07:19 +0100 Subject: Use start-app for elm --- src/client/elm/ServerCommunication.elm | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) (limited to 'src/client/elm/ServerCommunication.elm') diff --git a/src/client/elm/ServerCommunication.elm b/src/client/elm/ServerCommunication.elm index 62644f8..ff0937e 100644 --- a/src/client/elm/ServerCommunication.elm +++ b/src/client/elm/ServerCommunication.elm @@ -1,7 +1,5 @@ module ServerCommunication - ( Communication(..) - , sendRequest - , serverCommunications + ( sendRequest ) where import Signal @@ -14,31 +12,18 @@ import Debug import SimpleHTTP exposing (..) -import Model.User exposing (UserId) +import Model.Communication exposing (..) +import Model.Action as U +import Model.Action.LoggedInAction as UL +import Model.Action.MonthlyAction as UM +import Model.Action.AccountAction as UA +import Model.View.LoggedIn.AddPayment exposing (Frequency(..)) import Model.Payment exposing (..) -import Model.View.LoggedIn.Add exposing (Frequency(..)) -import Update as U exposing (actions) -import Update.SignIn exposing (..) -import Update.LoggedIn as UL -import Update.LoggedIn.Monthly as UM -import Update.LoggedIn.Account as UA +import Update.SignIn exposing (updateSignIn) import InitViewAction exposing (initViewAction) -type Communication = - NoCommunication - | SignIn String - | AddPayment String Int - | AddMonthlyPayment String Int - | SetIncome Time Int - | DeletePayment Payment Int - | DeleteMonthlyPayment PaymentId - | SignOut - -serverCommunications : Signal.Mailbox Communication -serverCommunications = Signal.mailbox NoCommunication - sendRequest : Communication -> Task Http.Error U.Action sendRequest communication = case communication of -- cgit v1.2.3