Skip to content

Commit

Permalink
Use the updated api-sdk version to allow querying of the API with eli…
Browse files Browse the repository at this point in the history
…feAssessmentSignificance terms

elifesciences/issues#9169
  • Loading branch information
LinaKind committed Feb 17, 2025
1 parent 4735c96 commit da5503f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Controller/BrowseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function queryAction(Request $request) : Response

$search = $this->get('elife.api_sdk.search.page')
->forSubject(...$arguments['query']['subjects'])
// ->forElifeAssessmentSignificance(...ElifeAssessmentTermsFilter::fromMinimumSignificance($arguments['query']['minimumSignificance']))
->forElifeAssessmentSignificance(...ElifeAssessmentTermsFilter::fromMinimumSignificance($arguments['query']['minimumSignificance']))
->forType(...$apiTypes)
->sortBy('date');

Expand Down
2 changes: 2 additions & 0 deletions test/Controller/BrowseControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ private function buildUrlRequestForOneItem()
'per-page' => '1',
'sort' => 'date',
'order' => 'desc',
'elifeAssessmentSignificance[]' => ['important', 'fundamental', 'landmark', 'useful', 'valuable', 'not-assigned'],
'type[]' => $this->researchTypes,
'use-date' => 'default',
]);
Expand All @@ -330,6 +331,7 @@ private function buildUrlRequestForTenItems()
'per-page' => '10',
'sort' => 'date',
'order' => 'desc',
'elifeAssessmentSignificance[]' => ['important', 'fundamental', 'landmark', 'useful', 'valuable', 'not-assigned'],
'type[]' => $this->researchTypes,
'use-date' => 'default',
]);
Expand Down

0 comments on commit da5503f

Please sign in to comment.