Merge branch 'develop' into beta
fixes for api token check and empty page feature image
This commit is contained in:
commit
8355137952
4 changed files with 15 additions and 6 deletions
|
@ -153,14 +153,22 @@ class APIControl
|
|||
case "page":
|
||||
$token = $request->getHeader("fipamo-access-token");
|
||||
//Verify token for admin tasks
|
||||
if (Session::verifyToken($token[0])) {
|
||||
$result = PagesAPI::handlePageTask($request, $args);
|
||||
if (isset($token[0])) {
|
||||
if (Session::verifyToken($token[0])) {
|
||||
$result = PagesAPI::handlePageTask($request, $args);
|
||||
} else {
|
||||
$result = [
|
||||
"message" => "Invalid token, API access denied, homie",
|
||||
"type" => "API_ERROR",
|
||||
];
|
||||
}
|
||||
} else {
|
||||
$result = [
|
||||
"message" => "API access denied, homie",
|
||||
"message" => "No token, API access denied, homie",
|
||||
"type" => "API_ERROR",
|
||||
];
|
||||
}
|
||||
|
||||
break;
|
||||
case "settings":
|
||||
$token = $request->getHeader("fipamo-access-token");
|
||||
|
|
|
@ -92,7 +92,7 @@ class Book
|
|||
"/" .
|
||||
$url[8];
|
||||
} else {
|
||||
$feature = $body["feature"];
|
||||
$task == "create" ? ($feature = "") : ($feature = $body["feature"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
4
public/assets/scripts/dash.min.js
vendored
4
public/assets/scripts/dash.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -313,6 +313,7 @@ class FipamoAdminAPI {
|
|||
if (
|
||||
eventType === TASK_SETTINGS_WRITE ||
|
||||
eventType === TASK_PAGE_EDIT ||
|
||||
eventType === TASK_PAGE_CREATE ||
|
||||
eventType === TASK_PAGE_DELETE ||
|
||||
eventType === TASK_PUBLISH_SITE ||
|
||||
eventType === TASK_REINDEX_PAGE
|
||||
|
|
Loading…
Reference in a new issue