summaryrefslogtreecommitdiff
path: root/lib/VNWeb/User/Login.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-12-08 10:41:09 +0100
committerYorhel <git@yorhel.nl>2019-12-08 10:41:12 +0100
commit113ca9f820f24b81486b5fb66045aa5ac1cb49c5 (patch)
tree3f3957372a2b6dace43996fdfcf3100bb239556e /lib/VNWeb/User/Login.pm
parentbf8739d1a5bc777eff864b6314a1e9bc3f464946 (diff)
Fix json_api() URL matching + move URL parameters to POST body
For more consistency. Only exception right now is the password reset form, which still has parameters in the URL. Didn't convert it as that code doesn't use the elm_form() framework at the moment.
Diffstat (limited to 'lib/VNWeb/User/Login.pm')
-rw-r--r--lib/VNWeb/User/Login.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNWeb/User/Login.pm b/lib/VNWeb/User/Login.pm
index 7c93e058..d1069b26 100644
--- a/lib/VNWeb/User/Login.pm
+++ b/lib/VNWeb/User/Login.pm
@@ -15,7 +15,7 @@ TUWF::get '/u/login' => sub {
};
-json_api '/u/login', {
+json_api qr{/u/login\.json}, {
username => { username => 1 },
password => { password => 1 }
}, sub {
@@ -41,7 +41,7 @@ json_api '/u/login', {
};
-json_api '/u/changepass', {
+json_api qr{/u/changepass\.json}, {
username => { username => 1 },
oldpass => { password => 1 },
newpass => { password => 1 },