aboutsummaryrefslogtreecommitdiff
path: root/src/client/ServerCommunication.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/ServerCommunication.elm')
-rw-r--r--src/client/ServerCommunication.elm16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/client/ServerCommunication.elm b/src/client/ServerCommunication.elm
index 20e2b14..6d65552 100644
--- a/src/client/ServerCommunication.elm
+++ b/src/client/ServerCommunication.elm
@@ -13,12 +13,12 @@ import Date
import Model.Message exposing (messageDecoder)
import Model.User exposing (UserId)
import Model.Payment exposing (..)
-import Model.View.Payment.Add exposing (Frequency(..))
+import Model.View.LoggedIn.Add exposing (Frequency(..))
import Update as U
import Update.SignIn exposing (..)
-import Update.LoggedView as UL
-import Update.LoggedView.Monthly as UM
+import Update.LoggedIn as UL
+import Update.LoggedIn.Monthly as UM
type Communication =
NoCommunication
@@ -86,24 +86,24 @@ serverResult communication response =
AddPayment userId name cost ->
Http.send Http.defaultSettings (updatePageRequest 1)
|> flip Task.andThen (decodeOkResponse paymentsDecoder (\payments ->
- Task.succeed <| U.UpdateLoggedView (UL.AddPayment userId name cost payments)
+ Task.succeed <| U.UpdateLoggedIn (UL.AddPayment userId name cost payments)
))
AddMonthlyPayment name cost ->
decodeOkResponse
("id" := paymentIdDecoder)
- (\id -> Task.succeed <| U.UpdateLoggedView (UL.AddMonthlyPayment id name cost))
+ (\id -> Task.succeed <| U.UpdateLoggedIn (UL.AddMonthlyPayment id name cost))
response
DeletePayment id userId cost currentPage ->
Http.send Http.defaultSettings (updatePageRequest currentPage)
|> flip Task.andThen (decodeOkResponse paymentsDecoder (\payments ->
- Task.succeed <| U.UpdateLoggedView (UL.DeletePayment userId cost payments)
+ Task.succeed <| U.UpdateLoggedIn (UL.DeletePayment userId cost payments)
))
DeleteMonthlyPayment id ->
- Task.succeed <| U.UpdateLoggedView (UL.UpdateMonthly (UM.DeletePayment id))
+ Task.succeed <| U.UpdateLoggedIn (UL.UpdateMonthly (UM.DeletePayment id))
UpdatePage page ->
decodeOkResponse
paymentsDecoder
- (\payments -> Task.succeed <| U.UpdateLoggedView (UL.UpdatePage page payments))
+ (\payments -> Task.succeed <| U.UpdateLoggedIn (UL.UpdatePage page payments))
response
SignOut ->
Task.succeed (U.GoSignInView)