re-activated site back up... for now...
This commit is contained in:
parent
734c6d36f1
commit
8df5e68024
3 changed files with 28 additions and 11 deletions
|
@ -125,6 +125,9 @@ class APIControl
|
||||||
case "backup": //move to 'api/auth'
|
case "backup": //move to 'api/auth'
|
||||||
$token = $request->getHeader("fipamo-access-token");
|
$token = $request->getHeader("fipamo-access-token");
|
||||||
//Verify token for admin tasks
|
//Verify token for admin tasks
|
||||||
|
$result = SettingsAPI::createBackup();
|
||||||
|
/*
|
||||||
|
|
||||||
if (Session::verifyToken($token[0])) {
|
if (Session::verifyToken($token[0])) {
|
||||||
$result = SettingsAPI::createBackup();
|
$result = SettingsAPI::createBackup();
|
||||||
} else {
|
} else {
|
||||||
|
@ -133,6 +136,7 @@ class APIControl
|
||||||
"type" => "API_ERROR",
|
"type" => "API_ERROR",
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
break;
|
break;
|
||||||
case "login": //move to 'api/auth'
|
case "login": //move to 'api/auth'
|
||||||
//check if request is remote and if so, verify token
|
//check if request is remote and if so, verify token
|
||||||
|
|
2
public/assets/scripts/dash.min.js
vendored
2
public/assets/scripts/dash.min.js
vendored
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));
|
mailBtn[i].addEventListener("click", (e) => this.handleMailOptions(e));
|
||||||
}
|
}
|
||||||
//handle backup from settings [disabled]
|
//handle backup from settings [disabled]
|
||||||
/*
|
|
||||||
document
|
document
|
||||||
.getElementById("create-backup")
|
.getElementById("create-backup")
|
||||||
.addEventListener("click", (e) => this.handleBackup(e));
|
.addEventListener("click", (e) => this.handleBackup(e));
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
document
|
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) {
|
handleReindex(e) {
|
||||||
if (this.processing) return;
|
if (this.processing) return;
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
Loading…
Reference in a new issue