Reload the page on status change
This commit is contained in:
parent
c17c7b7a82
commit
912c9f63a7
@ -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() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user