From e72ed778a2d139bab8588326ebba2f90c315a037 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 12 Feb 2025 15:56:11 +0300 Subject: [PATCH] feat(item): remove reviews from item struct. --- src/components/items_list.rs | 3 +-- src/models/item.rs | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/components/items_list.rs b/src/components/items_list.rs index fb2a0ed..e095b5f 100644 --- a/src/components/items_list.rs +++ b/src/components/items_list.rs @@ -116,7 +116,6 @@ pub fn ItemsList( id: Uuid::new_v4().to_string(), name: String::new(), description: String::new(), - // reviews: vec![], wikidata_id: None, custom_properties: HashMap::new(), }]); @@ -206,7 +205,7 @@ pub fn ItemsList( name: db_item.name, description: db_item.description, wikidata_id: db_item.wikidata_id, - custom_properties, // Deserialized HashMap + custom_properties, } }) .collect(); diff --git a/src/models/item.rs b/src/models/item.rs index 11c796b..dd980b0 100644 --- a/src/models/item.rs +++ b/src/models/item.rs @@ -7,13 +7,6 @@ pub struct Item { pub id: String, pub name: String, pub description: String, - // pub reviews: Vec, pub wikidata_id: Option, pub custom_properties: HashMap, } - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ReviewWithRating { - pub content: String, - pub rating: u8, // Ratings from 1 to 5 -}