diff options
author | Joris Guyonvarch | 2015-07-19 16:07:15 +0200 |
---|---|---|
committer | Joris Guyonvarch | 2015-07-19 16:07:15 +0200 |
commit | 0d589e12a0c32936303de46b1e462dd19648170d (patch) | |
tree | 95527317fae74ed620ad1b118abbbe2ccf616d19 /src/client/Update.elm | |
parent | e4eefaa5b418780e6fb63e929f826b927bbeac68 (diff) |
Login with a token validation
Diffstat (limited to 'src/client/Update.elm')
-rw-r--r-- | src/client/Update.elm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/client/Update.elm b/src/client/Update.elm index 3937888..1d0fe95 100644 --- a/src/client/Update.elm +++ b/src/client/Update.elm @@ -7,11 +7,14 @@ module Update import Model exposing (Model) import Model.Payment exposing (Payments) import Model.View exposing (..) +import Model.View.SignIn exposing (..) + +import Update.SignIn exposing (..) type Action = NoOp | SignIn - | UpdateLogin String + | UpdateSignIn SignInAction | UpdatePayments Payments actions : Signal.Mailbox Action @@ -23,8 +26,12 @@ updateModel action model = NoOp -> model SignIn -> - { model | view <- SignInView "" } - UpdateLogin login -> - { model | view <- SignInView login } + { model | view <- SignInView initSignIn } + UpdateSignIn signInAction -> + case model.view of + SignInView signIn -> + { model | view <- SignInView (updateSignIn signInAction signIn) } + _ -> + model UpdatePayments payments -> { model | view <- PaymentView payments } |