summaryrefslogtreecommitdiff
path: root/elm/User
diff options
context:
space:
mode:
Diffstat (limited to 'elm/User')
-rw-r--r--elm/User/Edit.elm2
-rw-r--r--elm/User/Login.elm4
-rw-r--r--elm/User/Register.elm2
3 files changed, 4 insertions, 4 deletions
diff --git a/elm/User/Edit.elm b/elm/User/Edit.elm
index 1a9b9a55..df1647e4 100644
--- a/elm/User/Edit.elm
+++ b/elm/User/Edit.elm
@@ -124,7 +124,7 @@ update msg model =
Submit ->
if model.cpass && model.pass1 /= model.pass2
then ({ model | passNeq = True }, Cmd.none )
- else ({ model | state = Api.Loading }, Api.post "/u/edit" (GUE.encode model.data) Submitted)
+ else ({ model | state = Api.Loading }, Api.post "/u/edit.json" (GUE.encode model.data) Submitted)
-- TODO: This reload is only necessary for the skin and customcss options to apply, but it's nicer to do that directly from JS.
Submitted GApi.Success -> (model, load <| "/u" ++ String.fromInt model.data.id ++ "/edit")
diff --git a/elm/User/Login.elm b/elm/User/Login.elm
index cc25d132..d28faf6b 100644
--- a/elm/User/Login.elm
+++ b/elm/User/Login.elm
@@ -80,11 +80,11 @@ update msg model =
Submit ->
if not model.insecure
then ( { model | state = Api.Loading }
- , Api.post "/u/login" (encodeLogin model) Submitted )
+ , Api.post "/u/login.json" (encodeLogin model) Submitted )
else if model.newpass1 /= model.newpass2
then ( { model | noteq = True }, Cmd.none )
else ( { model | state = Api.Loading }
- , Api.post "/u/changepass" (encodeChangePass model) Submitted )
+ , Api.post "/u/changepass.json" (encodeChangePass model) Submitted )
Submitted GApi.Success -> (model, load model.ref)
Submitted GApi.InsecurePass -> ({ model | insecure = True, state = if model.insecure then Api.Error GApi.InsecurePass else Api.Normal }, Cmd.none)
diff --git a/elm/User/Register.elm b/elm/User/Register.elm
index add16418..60f5d7d4 100644
--- a/elm/User/Register.elm
+++ b/elm/User/Register.elm
@@ -62,7 +62,7 @@ update msg model =
VNs n -> ({ model | vns = Maybe.withDefault model.vns (String.toInt n) }, Cmd.none)
Submit -> ( { model | state = Api.Loading }
- , Api.post "/u/register" (encodeForm model) Submitted )
+ , Api.post "/u/register.json" (encodeForm model) Submitted )
Submitted GApi.Success -> ({ model | success = True }, Cmd.none)
Submitted e -> ({ model | state = Api.Error e }, Cmd.none)