diff options
author | Adam T. Carpenter <atc@53hor.net> | 2020-11-07 08:15:37 -0500 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2020-11-07 08:15:37 -0500 |
commit | 2c408648c70614a88c0412faf6d3a00d147379a2 (patch) | |
tree | 6f8c84d0485917cf16b7f0420a2b74961177cc26 /dichroism/src/repo/entities | |
parent | 01de71698b91bc61e61d076f9c25d1cabb039b18 (diff) | |
download | theglassyladies-2c408648c70614a88c0412faf6d3a00d147379a2.tar.xz theglassyladies-2c408648c70614a88c0412faf6d3a00d147379a2.zip |
Added category to products.
Diffstat (limited to 'dichroism/src/repo/entities')
-rw-r--r-- | dichroism/src/repo/entities/product.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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<models::Product> for Product { @@ -25,7 +26,7 @@ impl Into<models::Product> 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), |