mirror of
https://gitlab.com/nekoya/web.git
synced 2024-11-26 08:17:49 +01:00
Fix error handler on controller
This commit is contained in:
parent
1dadd2caf0
commit
d43be73f0c
1 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ function register(email, password, first_name, last_name) {
|
|||
}
|
||||
return axios.post(HOST + '/register', params, conf)
|
||||
.then(response => response.status)
|
||||
.catch(error => console.log(error))
|
||||
.catch(error => [error.status, []])
|
||||
}
|
||||
|
||||
function login(email, password, ua, ip) {
|
||||
|
@ -53,7 +53,7 @@ function login(email, password, ua, ip) {
|
|||
}
|
||||
return axios.post(HOST + '/login', params, conf)
|
||||
.then(response => [response.status, response.data])
|
||||
.catch(error => console.log(error))
|
||||
.catch(error => [error.status, []])
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
Loading…
Reference in a new issue