mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 19:51:09 -04:00
refactor login
This commit is contained in:
@ -78,5 +78,4 @@ export const logout = ({ commit, dispatch, state }, noRequest = false) => {
|
||||
|
||||
export const loginOnBoardingUser = ({ commit, dispatch, state }, token) => {
|
||||
commit(types.AUTH_SUCCESS, token)
|
||||
window.toastr['success']('Login Successful')
|
||||
}
|
||||
|
||||
@ -206,6 +206,7 @@ export default {
|
||||
this.loading = false
|
||||
Ls.set('auth.token', response.data.token)
|
||||
this.loginOnBoardingUser(response.data.token)
|
||||
window.toastr['success']('Login Successful')
|
||||
this.$router.push('/admin/dashboard')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user