From 2c408648c70614a88c0412faf6d3a00d147379a2 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Sat, 7 Nov 2020 08:15:37 -0500 Subject: Added category to products. --- dichroism/src/repo/entities/product.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dichroism/src/repo/entities') diff --git a/dichroism/src/repo/entities/product.rs b/dichroism/src/repo/entities/product.rs index e6ba223..81f3d9e 100644 --- a/dichroism/src/repo/entities/product.rs +++ b/dichroism/src/repo/entities/product.rs @@ -14,6 +14,7 @@ pub struct Product { pub fullsize: String, pub base: String, pub thumbnail: String, + pub category: String, } impl Into for Product { @@ -25,7 +26,7 @@ impl Into for Product { quantity: self.quantity, cents: self.cents, featured: self.featured != 0, // TODO: is this safe? - category: String::new(), // TODO: real category + category: self.category, photo_set: models::PhotoSet { id: Some(self.photo_set_id), original: models::Photo::new(self.original), -- cgit v1.2.3