Merge branch 'develop' into beta

fixes for api token check and empty page feature image
This commit is contained in:
Ro 2021-06-30 14:08:52 -07:00
commit 8355137952
4 changed files with 15 additions and 6 deletions

View file

@ -153,14 +153,22 @@ class APIControl
case "page": case "page":
$token = $request->getHeader("fipamo-access-token"); $token = $request->getHeader("fipamo-access-token");
//Verify token for admin tasks //Verify token for admin tasks
if (Session::verifyToken($token[0])) { if (isset($token[0])) {
$result = PagesAPI::handlePageTask($request, $args); if (Session::verifyToken($token[0])) {
$result = PagesAPI::handlePageTask($request, $args);
} else {
$result = [
"message" => "Invalid token, API access denied, homie",
"type" => "API_ERROR",
];
}
} else { } else {
$result = [ $result = [
"message" => "API access denied, homie", "message" => "No token, API access denied, homie",
"type" => "API_ERROR", "type" => "API_ERROR",
]; ];
} }
break; break;
case "settings": case "settings":
$token = $request->getHeader("fipamo-access-token"); $token = $request->getHeader("fipamo-access-token");

View file

@ -92,7 +92,7 @@ class Book
"/" . "/" .
$url[8]; $url[8];
} else { } else {
$feature = $body["feature"]; $task == "create" ? ($feature = "") : ($feature = $body["feature"]);
} }
} }

File diff suppressed because one or more lines are too long

View file

@ -313,6 +313,7 @@ class FipamoAdminAPI {
if ( if (
eventType === TASK_SETTINGS_WRITE || eventType === TASK_SETTINGS_WRITE ||
eventType === TASK_PAGE_EDIT || eventType === TASK_PAGE_EDIT ||
eventType === TASK_PAGE_CREATE ||
eventType === TASK_PAGE_DELETE || eventType === TASK_PAGE_DELETE ||
eventType === TASK_PUBLISH_SITE || eventType === TASK_PUBLISH_SITE ||
eventType === TASK_REINDEX_PAGE eventType === TASK_REINDEX_PAGE