aboutsummaryrefslogtreecommitdiff
path: root/backend/src/handlers
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-12-26 17:22:54 +0000
committerAkshay <[email protected]>2020-12-26 17:22:54 +0000
commit2da02aac8a05ad82fdd6876c9ff6c0586efba10d (patch)
treea55fe5e90a6d7711745cd268f26aec2641189376 /backend/src/handlers
parentb8a744f6e7e02f67551124063d3dd97faba5fb0b (diff)
add model urls to catalog response
Diffstat (limited to 'backend/src/handlers')
-rw-r--r--backend/src/handlers/product.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/src/handlers/product.rs b/backend/src/handlers/product.rs
index 0113bc8..fe23680 100644
--- a/backend/src/handlers/product.rs
+++ b/backend/src/handlers/product.rs
@@ -81,6 +81,8 @@ struct CatalogProduct {
81 pub kind: Option<String>, 81 pub kind: Option<String>,
82 pub price: f32, 82 pub price: f32,
83 pub description: Option<String>, 83 pub description: Option<String>,
84 pub src: Option<String>,
85 pub ios_src: Option<String>,
84 pub average_rating: Option<f64>, 86 pub average_rating: Option<f64>,
85} 87}
86 88
@@ -116,6 +118,8 @@ pub async fn get_all_products(pool: web::Data<TPool>) -> impl Responder {
116 kind: p.kind, 118 kind: p.kind,
117 price: p.price, 119 price: p.price,
118 description: p.description, 120 description: p.description,
121 src: p.src,
122 ios_src: p.ios_src,
119 id: p.id, 123 id: p.id,
120 } 124 }
121 }) 125 })