Bind the logout link and export satsOnlyRow
This commit is contained in:
1 parent
f59311410f
commit
62c4d9d63c
1 file changed
+9
@@ -283,6 +283,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
|
var logout = document.querySelector("[data-logout]");
|
||||||
|
if (logout) {
|
||||||
|
logout.addEventListener("click", function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
api("POST", "/api/auth/logout").then(function () {
|
||||||
|
window.location.href = "/login";
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
var page = document.body ? document.body.dataset.page : "";
|
var page = document.body ? document.body.dataset.page : "";
|
||||||
var handler = handlers[page];
|
var handler = handlers[page];
|
||||||
if (!handler) {
|
if (!handler) {
|
||||||
|
|||||||
Reference in new issue
Block a user