Relaxed image upload auth.
# Conflicts: # src/com/controllers/MaintenanceManager.js # src/com/controllers/SettingsIndex.js
This commit is contained in:
commit
b1c884689e
2 changed files with 25 additions and 16 deletions
|
@ -188,21 +188,30 @@ class APIControl
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "settings":
|
case "settings":
|
||||||
$token = $request->getHeader("fipamo-access-token");
|
|
||||||
if (Session::verifyToken($token[0])) {
|
|
||||||
if (isset($body)) {
|
if (isset($body)) {
|
||||||
$postBody = $body;
|
$postBody = $body;
|
||||||
} else {
|
} else {
|
||||||
$postBody = null;
|
$postBody = null;
|
||||||
}
|
}
|
||||||
|
$task = $args["fourth"];
|
||||||
|
if ($task == "add-feature-background" || $task == "add-avatar") {
|
||||||
$result = SettingsAPI::handleSettingsTask($request, $args, $postBody);
|
$result = SettingsAPI::handleSettingsTask($request, $args, $postBody);
|
||||||
|
} else {
|
||||||
|
$token = $request->getHeader("fipamo-access-token");
|
||||||
|
if (Session::verifyToken($token[0])) {
|
||||||
|
$result = SettingsAPI::handleSettingsTask(
|
||||||
|
$request,
|
||||||
|
$args,
|
||||||
|
$postBody
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$result = [
|
$result = [
|
||||||
"message" => "API access denied, homie",
|
"message" => "API access denied, homie",
|
||||||
"type" => "API_ERROR",
|
"type" => "API_ERROR",
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "mailer":
|
case "mailer":
|
||||||
$result = MailerAPI::handleMail($request, $body, $response);
|
$result = MailerAPI::handleMail($request, $body, $response);
|
||||||
|
|
8
public/assets/scripts/dash.min.js
vendored
8
public/assets/scripts/dash.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue