fix: dispatch logout from axios if token expires

This commit is contained in:
Zephyrrus 2020-06-29 16:02:23 +03:00
parent 695d9a74ef
commit 4df3976ded
1 changed files with 4 additions and 0 deletions

View File

@ -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');
}
} }
}); });
} }