mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
Removed unnecessary notification
Removed unnecessary notification as the improved error handler will show it
This commit is contained in:
@ -21,13 +21,6 @@ export const login = ({ commit, dispatch, state }, data) => {
|
|||||||
window.toastr['success']('Login Successful')
|
window.toastr['success']('Login Successful')
|
||||||
resolve(response)
|
resolve(response)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
if (err.response.data.error === 'invalid_credentials') {
|
|
||||||
window.toastr['error']('Invalid Credentials')
|
|
||||||
} else {
|
|
||||||
// Something happened in setting up the request that triggered an Error
|
|
||||||
console.log('Error', err.message)
|
|
||||||
}
|
|
||||||
|
|
||||||
commit(types.AUTH_ERROR, err.response)
|
commit(types.AUTH_ERROR, err.response)
|
||||||
Ls.remove('auth.token')
|
Ls.remove('auth.token')
|
||||||
reject(err)
|
reject(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user