1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-07 21:56:33 +02:00

feat(endpoints): update Content Endpoints #565

This commit is contained in:
Awilum
2021-08-10 20:29:13 +03:00
parent 8bf347cac4
commit ea6b18c9ac

View File

@@ -127,7 +127,7 @@ class Content extends Endpoints
content()->create($data['id'], $data['data'] ?? []);
// Fetch content
$contentData = content()->fetch($data['id']);
$contentData = content()->fetch($data['id'])->toArray();
// Return response
if (count($contentData) > 0) {
@@ -193,7 +193,7 @@ class Content extends Endpoints
content()->update($data['id'], $data['data'] ?? []);
// Fetch content
$contentData = content()->fetch($data['id']);
$contentData = content()->fetch($data['id'])->toArray();
// Return response
if (count($contentData) > 0) {
@@ -264,7 +264,7 @@ class Content extends Endpoints
content()->move($data['id'], $data['new_id']);
// Fetch content
$contentData = content()->fetch($data['new_id']);
$contentData = content()->fetch($data['new_id'])->toArray();
// Return response
if (count($contentData) > 0) {
@@ -335,7 +335,7 @@ class Content extends Endpoints
content()->copy($data['id'], $data['new_id']);
// Fetch content
$contentData = content()->fetch($data['new_id']);
$contentData = content()->fetch($data['new_id'])->toArray();
// Return response
if (count($contentData) > 0) {