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();
vendors.forEach((Vendor v) { if (slim == 'true') {
if (v.properties?.data != null) { vendors.forEach((Vendor v) {
(v.properties.data as Map<String, dynamic>).removeWhere( if (v.properties?.data != null) {
(String key, dynamic value) => key == 'image' || key == 'logo' || key == 'product'); (v.properties.data as Map<String, dynamic>).removeWhere(
} (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