add missing api endpoint (GET) /api/pages

This commit is contained in:
Tim Moritz 2022-03-17 14:16:01 +01:00
parent 9a2ac1eaf4
commit 76e85f4082

View file

@ -149,8 +149,12 @@ class pluginAPI extends Plugin {
// /api/pages/:key
// /api/pages/:parent/:key
// (GET) /api/pages
if ( ($method==='GET') && ($parmA==='pages') && empty($parmB) ) {
$data = $this->getPages($inputs);
}
// (GET) /api/pages/files/:key
if ( ($method==='GET') && ($parmA==='pages') && ($parmB==='files') && !empty($parmC) ) {
elseif ( ($method==='GET') && ($parmA==='pages') && ($parmB==='files') && !empty($parmC) ) {
$key = $parmC;
if (!empty($parmD)) {
$key = $parmC.'/'.$parmD;