Skip to content

Commit

Permalink
Update Response.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi committed Aug 26, 2024
1 parent c3e6011 commit 27eefcd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Services/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ private function defaultResourceName(): string
private function getRequestedFieldsets(): array
{
$fieldSets = [];
if ($filters = Request::get(Config::get('apiato.requests.params.filter', 'fieldset'))) {
foreach ($filters as $filter) {
[$resourceName, $fields] = explode(':', $filter);
// TODO: BREAKING CHANGE: rename the default to fieldset
if ($requestFieldSets = Request::get(Config::get('apiato.requests.params.filter', 'filter'))) {
foreach ($requestFieldSets as $fieldSet) {
[$resourceName, $fields] = explode(':', $fieldSet);
// TODO: Maybe just split by comma and remove the explode?
// Decide between the two ';', & ',' and stick with one
$field = explode(';', $fields);
$fieldSets[$resourceName] = $field;
}
Expand Down

0 comments on commit 27eefcd

Please sign in to comment.