Skip to content

Commit

Permalink
fix: Remove unnecessary ending comma on Share or View on the web (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin-Loison authored Dec 10, 2023
1 parent 05a1328 commit 5ffdca3
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ import 'package:smooth_app/query/product_query.dart';

// TODO(m123): Move this to off-dart
Uri shareProductList(List<String> barcodes) {
final StringBuffer buffer = StringBuffer();

for (final String i in barcodes) {
buffer.write('$i,');
}
final String barcodesString = barcodes.join(',');

return UriHelper.replaceSubdomain(
ProductQuery.uriProductHelper.getUri(
path: 'products/$buffer',
path: 'products/$barcodesString',
addUserAgentParameters: false,
),
language: OpenFoodAPIConfiguration.globalLanguages?.first,
Expand Down

0 comments on commit 5ffdca3

Please sign in to comment.