Bug fix for 1177, get sub-pages via API

This commit is contained in:
dignajar 2020-05-12 23:05:29 +02:00
parent 134ac64e07
commit a5dc0addea
1 changed files with 3 additions and 0 deletions

View File

@ -136,6 +136,9 @@ class pluginAPI extends Plugin {
// (GET) /api/pages/<key>
elseif ( ($method==='GET') && ($parameters[0]==='pages') && !empty($parameters[1]) ) {
$pageKey = $parameters[1];
if (isset($parameters[2])) {
$pageKey = $parameters[1].'/'.$parameters[2];
}
$data = $this->getPage($pageKey);
}
// (PUT) /api/pages/<key>