fix: dispatch logout from axios if token expires
This commit is contained in:
parent
695d9a74ef
commit
4df3976ded
|
@ -13,6 +13,10 @@ export default function({ $axios, store }) {
|
||||||
text: error.response.data.message,
|
text: error.response.data.message,
|
||||||
error: true
|
error: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (error.response.data.message.indexOf('Token expired') !== -1) {
|
||||||
|
store.dispatch('logout');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue