1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 06:06:45 +02:00

feat(rest-api): add ability to call macroable fetch methods in Entries Rest API #505

This commit is contained in:
Awilum
2020-12-17 16:44:42 +03:00
parent ca8f338ccf
commit 3cd9fde427

View File

@@ -78,7 +78,7 @@ flextype()->get('/api/entries', function (Request $request, Response $response)
flextype('registry')->set('flextype.settings.entries.fields.entries.fetch.result', 'toArray');
if (isset($method) &&
strpos($body['method'], 'fetch') !== false &&
strpos($method, 'fetch') !== false &&
is_callable([flextype('entries'), $method])) {
$fetchFromCallbackMethod = $method;
} else {