diff options
Diffstat (limited to 'dichroism/src')
-rw-r--r-- | dichroism/src/dtos/product_get.rs | 6 | ||||
-rw-r--r-- | dichroism/src/models/photo.rs | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/dichroism/src/dtos/product_get.rs b/dichroism/src/dtos/product_get.rs index 3f68eef..aa52f19 100644 --- a/dichroism/src/dtos/product_get.rs +++ b/dichroism/src/dtos/product_get.rs @@ -24,9 +24,9 @@ impl From<Product> for ProductGet { quantity: p.quantity, featured: p.featured, category: p.category, - photo_fullsize: p.photo_set.fullsize.filename(), - photo_base: p.photo_set.base.filename(), - photo_thumbnail: p.photo_set.thumbnail.filename(), + photo_fullsize: p.photo_set.fullsize.id, + photo_base: p.photo_set.base.id, + photo_thumbnail: p.photo_set.thumbnail.id, } } } diff --git a/dichroism/src/models/photo.rs b/dichroism/src/models/photo.rs index e24a691..086d387 100644 --- a/dichroism/src/models/photo.rs +++ b/dichroism/src/models/photo.rs @@ -7,8 +7,4 @@ impl Photo { pub fn new(id: String) -> Self { Self { id } } - - pub fn filename(&self) -> String { - format!("{}.jpg", self.id) - } } |