Reload the page on status change
This commit is contained in:
parent
c17c7b7a82
commit
912c9f63a7
@ -20,7 +20,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
status: false,
|
status: undefined,
|
||||||
tokenId: null
|
tokenId: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -43,7 +43,12 @@ export default {
|
|||||||
checkValidity() {
|
checkValidity() {
|
||||||
axios.get('/api/auth')
|
axios.get('/api/auth')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
const oldStatus = this.status;
|
||||||
this.status = res.data.status;
|
this.status = res.data.status;
|
||||||
|
|
||||||
|
if (oldStatus !== undefined && oldStatus !== this.status) {
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getCurrentToken() {
|
getCurrentToken() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user