forked from goffee/cup
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();
|
||||
}
|
||||
})
|
||||
};
|
||||
}
|
||||
|
|
@ -4,8 +4,10 @@
|
|||
<body>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
{{template "content_dropdown" .ContentDropdown}}
|
||||
{{template "page_card" .PageCard}}
|
||||
{{ define "page_card_content" }}
|
||||
|
||||
<img class="goffeelogo"src="/public/img/goffee.png" alt="Goffee logo" />
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue