Skip to content

Commit

Permalink
Pass query parameters as a map
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-selo committed Oct 24, 2023
1 parent 23e3156 commit 64962e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/lib/providers/family_artefacts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ Future<List<Artefact>> familyArtefacts(
FamilyName family,
) async {
final dio = ref.watch(dioProvider);

final response = await dio.get('/v1/artefacts?family=${family.name}');
final response = await dio.get(
'/v1/artefacts',
queryParameters: {'family': family.name},
);
final List artefactsJson = response.data;
final artefacts =
artefactsJson.map((json) => Artefact.fromJson(json)).toList();
Expand Down

0 comments on commit 64962e8

Please sign in to comment.