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.elm19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/client/ServerCommunication.elm b/src/client/ServerCommunication.elm
index fefbbff..5736f77 100644
--- a/src/client/ServerCommunication.elm
+++ b/src/client/ServerCommunication.elm
@@ -10,7 +10,6 @@ import Http
import Json.Decode exposing (..)
import Date
-import Model.Message exposing (messageDecoder)
import Model.User exposing (UserId)
import Model.Payment exposing (..)
import Model.View.LoggedIn.Add exposing (Frequency(..))
@@ -108,16 +107,16 @@ serverResult communication response =
SignOut ->
Task.succeed (U.GoSignInView)
errorStatus ->
- decodeResponse
- messageDecoder
- (\error ->
- case communication of
- SignIn _ ->
+ case communication of
+ SignIn _ ->
+ decodeResponse
+ ("error" := string)
+ (\error ->
Task.succeed <| U.UpdateSignIn (ErrorLogin error)
- _ ->
- Task.succeed <| U.NoOp
- )
- response
+ )
+ response
+ _ ->
+ Task.succeed <| U.NoOp
decodeOkResponse : Decoder a -> (a -> Task b U.Action) -> Http.Response -> Task b U.Action
decodeOkResponse decoder responseToAction response =