From e482aa83cbc0c1f06be3280d1d8b4c008ad06b94 Mon Sep 17 00:00:00 2001 From: Alexander Walther <mail@alexplus.de> Date: Sun, 17 Dec 2023 15:10:45 +0100 Subject: [PATCH 1/2] Update boot.php --- boot.php | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/boot.php b/boot.php index 07a7065..81bc94a 100644 --- a/boot.php +++ b/boot.php @@ -33,7 +33,7 @@ /* YForm Rest API */ $rex_neues_entry_route = new \rex_yform_rest_route( [ - 'path' => '/neues/3/date/', + 'path' => '/neues/4/date/', 'auth' => '\rex_yform_rest_auth_token::checkToken', 'type' => \neues_entry::class, 'query' => \neues_entry::query(), @@ -41,23 +41,56 @@ 'fields' => [ 'rex_neues_entry' => [ 'id', + 'status', 'name', + 'teaser', 'description', + 'domain_ids', + 'lang_id', + 'publishdate', + 'author_id', + 'url', + 'image', 'images', - 'status', + 'createdate', + 'createuser', + 'updatedate', + 'updateuser' ], 'rex_neues_category' => [ 'id', 'name', + 'image', + 'status', + ], + 'rex_neues_author' => [ + 'id', + 'name', + 'nickname', + 'text', + 'image', + 'be_user_id' ], ], ], 'post' => [ 'fields' => [ 'rex_neues_entry' => [ + 'status', 'name', + 'teaser', 'description', + 'domain_ids', + 'lang_id', + 'publishdate', + 'author_id', + 'url', + 'image', 'images', + 'createdate', + 'createuser', + 'updatedate', + 'updateuser' ], ], ], @@ -76,7 +109,7 @@ /* YForm Rest API */ $rex_neues_category_route = new \rex_yform_rest_route( [ - 'path' => '/v0.dev/neues/category/', + 'path' => '/neues/4/category/', 'auth' => '\rex_yform_rest_auth_token::checkToken', 'type' => \neues_category::class, 'query' => \neues_category::query(), @@ -85,7 +118,7 @@ 'rex_neues_category' => [ 'id', 'name', - 'description', + 'image', 'status', ], ], @@ -94,6 +127,8 @@ 'fields' => [ 'rex_neues_category' => [ 'name', + 'image', + 'status', ], ], ], @@ -110,6 +145,7 @@ \rex_yform_rest::addRoute($rex_neues_category_route); } + rex_extension::register('YFORM_DATA_LIST', static function ($ep) { if ('rex_neues_entry' == $ep->getParam('table')->getTableName()) { $list = $ep->getSubject(); From 11ea12d9d646acb1c2ead26697e0b6054e44ef53 Mon Sep 17 00:00:00 2001 From: alxndr-w <alxndr-w@users.noreply.github.com> Date: Sun, 17 Dec 2023 14:11:39 +0000 Subject: [PATCH 2/2] Apply php-cs-fixer changes --- boot.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/boot.php b/boot.php index 81bc94a..355bb27 100644 --- a/boot.php +++ b/boot.php @@ -55,7 +55,7 @@ 'createdate', 'createuser', 'updatedate', - 'updateuser' + 'updateuser', ], 'rex_neues_category' => [ 'id', @@ -69,7 +69,7 @@ 'nickname', 'text', 'image', - 'be_user_id' + 'be_user_id', ], ], ], @@ -90,7 +90,7 @@ 'createdate', 'createuser', 'updatedate', - 'updateuser' + 'updateuser', ], ], ], @@ -145,7 +145,6 @@ \rex_yform_rest::addRoute($rex_neues_category_route); } - rex_extension::register('YFORM_DATA_LIST', static function ($ep) { if ('rex_neues_entry' == $ep->getParam('table')->getTableName()) { $list = $ep->getSubject();