Commit ef39a0ed authored by Leon Tappe's avatar Leon Tappe 🔥
Browse files

add forgotten if statement for slim mode

parent 35c7c653
...@@ -91,12 +91,14 @@ class VendorController extends ResourceController { ...@@ -91,12 +91,14 @@ class VendorController extends ResourceController {
} }
final vendors = await vendorQuery.fetch(); final vendors = await vendorQuery.fetch();
if (slim == 'true') {
vendors.forEach((Vendor v) { vendors.forEach((Vendor v) {
if (v.properties?.data != null) { if (v.properties?.data != null) {
(v.properties.data as Map<String, dynamic>).removeWhere( (v.properties.data as Map<String, dynamic>).removeWhere(
(String key, dynamic value) => key == 'image' || key == 'logo' || key == 'product'); (String key, dynamic value) => key == 'image' || key == 'logo' || key == 'product');
} }
}); });
}
return Response.ok(vendors); return Response.ok(vendors);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment