2👍
✅
Based on what you’ve posted, it would be:
UserService.login(loginJson).then(response => {
// handle response...
}).catch(error => {
// handle error...
})
You’ve already setup login
to return the promise from axios, so just continue the chain.
Source:stackexchange.com