From c0236aae77118187902ecf08fee8e7f9152c39af Mon Sep 17 00:00:00 2001 From: Tim Moritz Date: Thu, 17 Mar 2022 14:08:54 +0100 Subject: [PATCH] add missing api endpoint (GET) /api/pages --- bl-plugins/api/plugin.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bl-plugins/api/plugin.php b/bl-plugins/api/plugin.php index 8967fb08..cac96eaf 100644 --- a/bl-plugins/api/plugin.php +++ b/bl-plugins/api/plugin.php @@ -152,8 +152,12 @@ class pluginAPI extends Plugin { // /api/pages/:key // /api/pages/:parent/:key - // (GET) /api/pages/files/:key - if ( ($method==='GET') && ($parmA==='pages') && ($parmB==='files') && !empty($parmC) ) { + // (GET) /api/pages + if ( ($method==='GET') && ($parmA==='pages') && empty($parmB) ) { + $data = $this->getPages($inputs); + } + // (GET) /api/pages/files/:key + elseif ( ($method==='GET') && ($parmA==='pages') && ($parmB==='files') && !empty($parmC) ) { $key = $parmC; if (!empty($parmD)) { $key = $parmC.'/'.$parmD;