Creation bibliotheque js
This commit is contained in:
9
web/js/library.js
Normal file
9
web/js/library.js
Normal file
@@ -0,0 +1,9 @@
|
||||
function checkToken(){
|
||||
|
||||
instance.get("token", { withCredentials: true})
|
||||
.then(function(response) { location.href="html/home.html"; })
|
||||
.catch(function(error){
|
||||
location.href="/";
|
||||
});
|
||||
|
||||
}
|
@@ -1,8 +1,4 @@
|
||||
instance.get("token", { withCredentials: true})
|
||||
.then(function(response) { location.href="html/home.html"; })
|
||||
.catch(function(error){
|
||||
|
||||
});
|
||||
checkToken();
|
||||
|
||||
document.getElementById("signin").addEventListener("submit", function(evt){
|
||||
evt.preventDefault();
|
||||
|
Reference in New Issue
Block a user