From a7b1c47080f1e3bb31dfea70794a0cbcd742571f Mon Sep 17 00:00:00 2001 From: Roman Hergenreder Date: Sun, 21 Jun 2020 15:44:33 +0200 Subject: [PATCH] small fix --- js/admin.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/js/admin.js b/js/admin.js index 998f591..a1bc5c2 100644 --- a/js/admin.js +++ b/js/admin.js @@ -15,7 +15,7 @@ $(document).ready(function() { btn.prop("disabled", true); btn.html("Logging in… "); jsCore.apiCall("/user/login", {"username": username, "password": password, "stayLoggedIn": stayLoggedIn }, function(data) { - window.location.reload(); + document.location = "/admin/dashboard"; }, function(err) { btn.html("Login"); btn.prop("disabled", false); @@ -25,12 +25,4 @@ $(document).ready(function() { errorDiv.show(); }); }); - - $("#btnLogout").click(function() { - jsCore.apiCall("/user/logout", function(data) { - document.location = "/admin/dashboard"; - }, function(err) { - alert(err); - }); - }); });