add checktoken interceptors and remove loop refresh
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
function checkToken(){
|
||||
|
||||
instance.get("token", { withCredentials: true})
|
||||
.then(function(response) { location.href="html/home.html"; })
|
||||
.then(function(response) {
|
||||
if(location.href.pathname == "/")
|
||||
{
|
||||
location.href="/html/home.html";
|
||||
}
|
||||
})
|
||||
.catch(function(error){
|
||||
location.href="/";
|
||||
});
|
||||
|
Reference in New Issue
Block a user