Trim username spaces while logging in

This commit is contained in:
Grégoire Delattre 2017-08-13 10:14:48 +02:00
parent ebaf17e6e4
commit a336c3a4dc

View File

@ -14,7 +14,7 @@ export function loginUser(username, password) {
configureAxios().post(
"/users/login",
{
username: username,
username: username.trim(),
password: password,
},
),
@ -32,6 +32,10 @@ export function updateUser(config) {
}
export function userSignUp(config) {
if (config.username) {
config.username = config.username.trim();
}
return request(
"USER_SIGNUP",
configureAxios().post("/users/signup", config), [