diff --git a/web/html/home.html b/web/html/home.html index 4d85ecd..e0b85c0 100644 --- a/web/html/home.html +++ b/web/html/home.html @@ -94,7 +94,7 @@ diff --git a/web/js/home.js b/web/js/home.js index dd5f6d8..9f37a3a 100644 --- a/web/js/home.js +++ b/web/js/home.js @@ -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="/" + } + }); +});