Relaxed image upload auth.

# Conflicts:
#	src/com/controllers/MaintenanceManager.js
#	src/com/controllers/SettingsIndex.js
beta
Ro 3 years ago
commit b1c884689e

@ -188,21 +188,30 @@ class APIControl
break;
case "settings":
$token = $request->getHeader("fipamo-access-token");
if (Session::verifyToken($token[0])) {
if (isset($body)) {
$postBody = $body;
} else {
$postBody = null;
}
$task = $args["fourth"];
if ($task == "add-feature-background" || $task == "add-avatar") {
$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 {
$result = [
"message" => "API access denied, homie",
"type" => "API_ERROR",
];
}
}
break;
case "mailer":
$result = MailerAPI::handleMail($request, $body, $response);

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save