disconnect click
This commit is contained in:
parent
614a852fe6
commit
a05f0db745
@ -94,7 +94,7 @@
|
||||
<input class="form-control form-control-dark w-100 rounded-0 border-0" type="text" placeholder="Search" aria-label="Search">
|
||||
<div class="navbar-nav">
|
||||
<div class="nav-item text-nowrap">
|
||||
<a class="nav-link px-3" href="#">Sign out</a>
|
||||
<a class="nav-link px-3" id="signout" href="#">Sign out</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
@ -36,3 +36,10 @@ instance.get("users", {withCredentials: true, params :{ page:0, nbPages: nbPages
|
||||
});
|
||||
|
||||
|
||||
document.getElementById("signout").addEventListener("click", function(){
|
||||
instance.delete("token" , {withCredentials:true}).then(function(response){
|
||||
if(response.status == 200){
|
||||
location.href="/"
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user