diff options
Diffstat (limited to 'src/client/Update')
-rw-r--r-- | src/client/Update/SignIn.elm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/Update/SignIn.elm b/src/client/Update/SignIn.elm index a962f90..0e118dc 100644 --- a/src/client/Update/SignIn.elm +++ b/src/client/Update/SignIn.elm @@ -7,9 +7,18 @@ import Model.View.SignIn exposing (..) type SignInAction = UpdateLogin String + | ValidLogin String + | ErrorLogin String updateSignIn : SignInAction -> SignIn -> SignIn updateSignIn action signIn = case action of UpdateLogin login -> { signIn | login <- login } + ValidLogin message -> + { signIn + | login <- "" + , result <- Just (Ok message) + } + ErrorLogin message -> + { signIn | result <- Just (Err message) } |