small fix
This commit is contained in:
parent
bf20318a8d
commit
a7b1c47080
10
js/admin.js
10
js/admin.js
@ -15,7 +15,7 @@ $(document).ready(function() {
|
||||
btn.prop("disabled", true);
|
||||
btn.html("Logging in… <i class=\"fa fa-spin fa-circle-notch\"></i>");
|
||||
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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user