#364: update ap_id error with username
This commit is contained in:
parent
a842cadd15
commit
5251ccd708
1 changed files with 8 additions and 2 deletions
|
@ -231,8 +231,14 @@ const users = {
|
||||||
store.commit('setToken', result.access_token)
|
store.commit('setToken', result.access_token)
|
||||||
store.dispatch('loginUser', result.access_token)
|
store.dispatch('loginUser', result.access_token)
|
||||||
} else {
|
} else {
|
||||||
let data = await response.json()
|
const data = await response.json()
|
||||||
let errors = humanizeErrors(JSON.parse(data.error))
|
let errors = JSON.parse(data.error)
|
||||||
|
// replace ap_id with username
|
||||||
|
if (errors.ap_id) {
|
||||||
|
errors.username = errors.ap_id
|
||||||
|
delete errors.ap_id
|
||||||
|
}
|
||||||
|
errors = humanizeErrors(errors)
|
||||||
store.commit('signUpFailure', errors)
|
store.commit('signUpFailure', errors)
|
||||||
throw Error(errors)
|
throw Error(errors)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue