aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/ServerCommunication.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/ServerCommunication.elm')
-rw-r--r--src/client/elm/ServerCommunication.elm31
1 files changed, 8 insertions, 23 deletions
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