re-activated site back up... for now...

pull/84/head
Ro 3 years ago
parent 734c6d36f1
commit 8df5e68024

@ -125,14 +125,18 @@ class APIControl
case "backup": //move to 'api/auth'
$token = $request->getHeader("fipamo-access-token");
//Verify token for admin tasks
if (Session::verifyToken($token[0])) {
$result = SettingsAPI::createBackup();
} else {
$result = [
"message" => "API access denied, homie",
"type" => "API_ERROR",
];
}
$result = SettingsAPI::createBackup();
/*
if (Session::verifyToken($token[0])) {
$result = SettingsAPI::createBackup();
} else {
$result = [
"message" => "API access denied, homie",
"type" => "API_ERROR",
];
}
*/
break;
case "login": //move to 'api/auth'
//check if request is remote and if so, verify token

File diff suppressed because one or more lines are too long

@ -93,11 +93,10 @@ export default class SettingsIndex {
mailBtn[i].addEventListener("click", (e) => this.handleMailOptions(e));
}
//handle backup from settings [disabled]
/*
document
.getElementById("create-backup")
.addEventListener("click", (e) => this.handleBackup(e));
*/
/*
document
@ -207,6 +206,20 @@ export default class SettingsIndex {
});
}
handleBackup(e) {
e.preventDefault();
e.stopPropagation();
notify.alert("Creating backup", null);
this.mm
.backup()
.then((r) => {
notify.alert(r.message, true);
})
.catch((err) => {
notify.alert(err, false);
});
}
handleReindex(e) {
if (this.processing) return;
let self = this;

Loading…
Cancel
Save