mirror of
https://github.com/aunefyren/wrapperr
synced 2024-11-10 05:34:12 +00:00
Removed old function
This commit is contained in:
parent
0dc593fc21
commit
07a12ade2b
1 changed files with 0 additions and 33 deletions
|
@ -262,39 +262,6 @@ function update_password() {
|
|||
return;
|
||||
}
|
||||
|
||||
function get_admin_state() {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4) {
|
||||
|
||||
try {
|
||||
var result= JSON.parse(this.responseText);
|
||||
} catch(error) {
|
||||
console.log('Failed to parse API response. Response: ' + this.responseText)
|
||||
return;
|
||||
}
|
||||
|
||||
if(result.error) {
|
||||
console.log(result.message);
|
||||
} else if(!result.configured) {
|
||||
first_time = true;
|
||||
set_password_form();
|
||||
} else {
|
||||
login_menu();
|
||||
}
|
||||
|
||||
} else if(this.readyState == 4 && this.status !== 200) {
|
||||
var html = '<h2>' + this.status + ' Error</h2>';
|
||||
html += '<p>The API did not respond correctly.</p>';
|
||||
document.getElementById("setup").innerHTML = html;
|
||||
}
|
||||
};
|
||||
xhttp.withCredentials = true;
|
||||
xhttp.open("post", api_url + "get_admin_state.php");
|
||||
xhttp.send();
|
||||
return;
|
||||
}
|
||||
|
||||
function sign_out() {
|
||||
set_cookie("wrapperr-admin", "", 1);
|
||||
location.reload();
|
||||
|
|
Loading…
Reference in a new issue