14 lines
No EOL
350 B
JavaScript
14 lines
No EOL
350 B
JavaScript
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();
|
|
}
|
|
})
|
|
};
|
|
} |