2022-07-25 20:35:54 +02:00
|
|
|
function checkToken(){
|
|
|
|
|
|
|
|
instance.get("token", { withCredentials: true})
|
2022-07-25 23:46:32 +02:00
|
|
|
.then(function(response) {
|
2022-07-28 00:15:57 +02:00
|
|
|
if(location.pathname == "/")
|
2022-07-25 23:46:32 +02:00
|
|
|
{
|
|
|
|
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
|
|
|
});
|
|
|
|
|
|
|
|
}
|