Reload the page on status change

This commit is contained in:
Daniel_I_Am 2021-09-02 14:48:52 +02:00
parent c17c7b7a82
commit 912c9f63a7

View File

@ -20,7 +20,7 @@ export default {
},
data() {
return {
status: false,
status: undefined,
tokenId: null
};
},
@ -43,7 +43,12 @@ export default {
checkValidity() {
axios.get('/api/auth')
.then(res => {
const oldStatus = this.status;
this.status = res.data.status;
if (oldStatus !== undefined && oldStatus !== this.status) {
window.location.reload();
}
});
},
getCurrentToken() {