diff --git a/lib/neues_restful_api.php b/lib/neues_restful_api.php index f8a84aa..6383602 100644 --- a/lib/neues_restful_api.php +++ b/lib/neues_restful_api.php @@ -16,7 +16,7 @@ public static function init() :void { 'query' => Entry::query(), 'get' => [ 'fields' => [ - 'rex_neues_entry' => [ + 'FriendsOfRedaxo\Neues\Entry' => [ 'id', 'status', 'name', @@ -26,6 +26,7 @@ public static function init() :void { 'lang_id', 'publishdate', 'author_id', + 'category_ids', 'url', 'image', 'images', @@ -33,26 +34,37 @@ public static function init() :void { 'createuser', 'updatedate', 'updateuser', + 'uuid', ], - 'rex_neues_category' => [ + 'FriendsOfRedaxo\Neues\Category' => [ 'id', 'name', 'image', 'status', + 'createdate', + 'createuser', + 'updatedate', + 'updateuser', + 'uuid', ], - 'rex_neues_author' => [ + 'FriendsOfRedaxo\Neues\Author' => [ 'id', 'name', 'nickname', 'text', 'image', 'be_user_id', + 'createdate', + 'createuser', + 'updatedate', + 'updateuser', + 'uuid', ], ], ], 'post' => [ 'fields' => [ - 'rex_neues_entry' => [ + 'FriendsOfRedaxo\Neues\Entry' => [ 'status', 'name', 'teaser', @@ -73,7 +85,7 @@ public static function init() :void { ], 'delete' => [ 'fields' => [ - 'rex_neues_entry' => [ + 'FriendsOfRedaxo\Neues\Entry' => [ 'id', ], ], @@ -92,26 +104,32 @@ public static function init() :void { 'query' => Category::query(), 'get' => [ 'fields' => [ - 'rex_neues_category' => [ + 'FriendsOfRedaxo\Neues\Category' => [ 'id', 'name', 'image', 'status', + 'createdate', + 'createuser', + 'updatedate', + 'updateuser', + 'uuid', ], ], ], 'post' => [ 'fields' => [ - 'rex_neues_category' => [ + 'FriendsOfRedaxo\Neues\Category' => [ 'name', 'image', 'status', + 'uuid', ], ], ], 'delete' => [ 'fields' => [ - 'rex_neues_category' => [ + 'FriendsOfRedaxo\Neues\Category' => [ 'id', ], ], @@ -130,19 +148,24 @@ public static function init() :void { 'query' => Author::query(), 'get' => [ 'fields' => [ - 'rex_neues_author' => [ + 'FriendsOfRedaxo\Neues\Author' => [ 'id', 'name', 'nickname', 'text', 'image', 'be_user_id', + 'createdate', + 'createuser', + 'updatedate', + 'updateuser', + 'uuid', ], ], ], 'post' => [ 'fields' => [ - 'rex_neues_author' => [ + 'FriendsOfRedaxo\Neues\Author' => [ 'name', 'nickname', 'text', @@ -153,7 +176,7 @@ public static function init() :void { ], 'delete' => [ 'fields' => [ - 'rex_neues_author' => [ + 'FriendsOfRedaxo\Neues\Author' => [ 'id', ], ], diff --git a/lib/rex_cronjob_neues_sync.php b/lib/rex_cronjob_neues_sync.php index b4b9963..c624359 100644 --- a/lib/rex_cronjob_neues_sync.php +++ b/lib/rex_cronjob_neues_sync.php @@ -44,6 +44,12 @@ public function execute() $neues_category->setValue('uuid', $category['uuid']); $neues_category->setValue('name', $category['name']); + $neues_category->setValue('image', $category['image']); + $neues_category->setValue('status', $status); + $neues_category->setValue('createdate', $category['createdate']); + $neues_category->setValue('createuser', 'cronjob'); + $neues_category->setValue('updatedate', $category['updatedate']); + $neues_category->setValue('updateuser', 'cronjob'); $neues_category->save(); } @@ -56,6 +62,8 @@ public function execute() $neues_author->setValue('uuid', $author['uuid']); $neues_author->setValue('name', $author['name']); + $neues_author->setValue('nickname', $author['nickname']); + $neues_author->setValue('text', $author['text']); $neues_author->save(); }