js destroy session
This commit is contained in:
parent
0b2abac628
commit
19c24593fe
5 changed files with 115 additions and 64 deletions
|
|
@ -1 +1,14 @@
|
|||
console.log("Start Goffee app");
|
||||
console.log("Start Goffee app");
|
||||
|
||||
let elem = document.querySelector('#signout');
|
||||
if (elem) {
|
||||
document.getElementById("signout").onclick = (_event) => {
|
||||
fetch('/signout').then(response => response.json())
|
||||
.then(data => {
|
||||
if (data['message'] == "signed out successfully") {
|
||||
// Refresh the page
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue