backoffice/web/js/library.js

16 lines
337 B
JavaScript
Raw Normal View History

2022-07-25 20:35:54 +02:00
function checkToken(){
instance.get("token", { withCredentials: true})
.then(function(response) {
2022-07-28 00:15:57 +02:00
if(location.pathname == "/")
{
location.href="/html/home.html";
}
})
2022-07-25 20:35:54 +02:00
.catch(function(error){
2022-07-28 00:15:57 +02:00
if(location.pathname != "/"){
location.href="/";
}
2022-07-25 20:35:54 +02:00
});
}