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