Skip to content

Commit eaf4c68

Browse files
committed
fix(headlines-search): update country repository filter key
- Change filter key from 'name' to 'q' in two instances - This modification ensures correct filtering when searching for countries
1 parent 2cf3896 commit eaf4c68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/headlines-search/bloc/headlines_search_bloc.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class HeadlinesSearchBloc
179179
// of 'eventCountry'. This ensures that only countries for which
180180
// there are associated headlines are returned.
181181
response = await _countryRepository.readAll(
182-
filter: {'name': searchTerm, 'usage': 'eventCountry'},
182+
filter: {'q': searchTerm, 'usage': 'eventCountry'},
183183
pagination: PaginationOptions(
184184
limit: _limit,
185185
cursor: successState.cursor,
@@ -272,7 +272,7 @@ class HeadlinesSearchBloc
272272
// of 'eventCountry'. This ensures that only countries for which
273273
// there are associated headlines are returned.
274274
rawResponse = await _countryRepository.readAll(
275-
filter: {'name': searchTerm, 'usage': 'eventCountry'},
275+
filter: {'q': searchTerm, 'usage': 'eventCountry'},
276276
pagination: const PaginationOptions(limit: _limit),
277277
sort: [const SortOption('name', SortOrder.asc)],
278278
);

0 commit comments

Comments
 (0)