Mercurial > gemma
diff client/src/stores/user.js @ 484:2ac37419f593
Implemented wamos/issue114 (Improve code consistency: For login use json body, disallow GET).
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 24 Aug 2018 11:36:11 +0200 |
parents | 516f0f84fe39 |
children | 04a6bea229e4 |
line wrap: on
line diff
--- a/client/src/stores/user.js Fri Aug 24 10:50:58 2018 +0200 +++ b/client/src/stores/user.js Fri Aug 24 11:36:11 2018 +0200 @@ -1,5 +1,4 @@ import { HTTP } from "../lib/http"; -import qs from "qs"; const User = { namespaced: true, @@ -66,7 +65,7 @@ // using POST is a bit more secure than GET return new Promise((resolve, reject) => { // axios will add the application/x-www-form-urlencoded header this way - HTTP.post("/login", qs.stringify(user)) + HTTP.post("/login", user) .then(response => { commit("auth_success", response.data); resolve(response);