Skip to content

Commit

Permalink
feat: rename config
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi committed Nov 29, 2024
1 parent bdd9e1f commit 83de82f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/Services/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ private function defaultResourceName(): string

private function getRequestedFieldsets(): array
{
// TODO: start from here! Use the fractal.php config to get the include, exclude, and fieldset keys
// TODO: BREAKING CHANGE: rename the default to "fields"
return request()?->input(config('apiato.requests.params.filter', 'filter')) ?? [];
return request()?->input(config('apiato.requests.sparse_fieldsets.request_key')) ?? [];
}

private function setAvailableIncludesMeta(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ protected function setUp(): void
{
parent::setUp();

config()->set('apiato.requests.params.filter', self::FIELDSET_KEY);
config()->set('apiato.requests.sparse_fieldsets.request_key', self::FIELDSET_KEY);

$this->user = UserFactory::new()
->for(UserFactory::new()->has(BookFactory::new()), 'parent')
Expand Down

0 comments on commit 83de82f

Please sign in to comment.