ldc-supportweb/resources/ts/modules/session_pinger.ts
2022-08-30 13:21:07 +00:00

16 lines
417 B
TypeScript

export default {
methods: {
async validateSession(callback: CallableFunction) {
window.axios
.get("/ping")
.then((response) => {
if (response.status !== 200) {
callback();
}
})
.catch(() => {
callback();
});
},
},
};