Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Actually perform a logout when clicking on the logout button

Roland Geider2d8d7b0b7ad7
diff --git a/manager/static/js/browserid.js b/manager/static/js/browserid.js
index 48f87cca3..789c2d521 100644
--- a/manager/static/js/browserid.js
+++ b/manager/static/js/browserid.js
@@ -48,8 +48,12 @@
},
onlogout: function() {
- // TODO: Detect if logout button was a link and follow its href
- // if possible.
+ $.ajax({
+ type: 'GET',
+ url: '/logout',
+ success: function(res, status, xhr) { window.location.reload(); },
+ error: function(xhr, status, err) { alert("logout failure: " + err); }
+ });
}
});
});