update env.example and fix token-issue

This commit is contained in:
Mohit Panjwani
2019-11-19 19:26:13 +05:30
parent 953598b2e8
commit b3aeafef47
7 changed files with 14 additions and 209981 deletions

View File

@ -92,8 +92,7 @@ global.axios.interceptors.response.use(undefined, function (err) {
if (err.response.data.error === 'invalid_credentials') {
window.toastr['error']('Invalid Credentials')
}
if (err.response.data && err.response.statusText === 'Unauthorized') {
if (err.response.data && (err.response.statusText === 'Unauthorized' || err.response.data === ' Unauthorized.')) {
store.dispatch('auth/logout', true)
} else {
throw err