From 59e1ecd18169115c4641e346d05ac9393e357435 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Fri, 29 Aug 2025 11:52:25 -0300 Subject: [PATCH] refactor: remove content_url from item metadata Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) --- src/modes/server/api/item.rs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/modes/server/api/item.rs b/src/modes/server/api/item.rs index 5876e85..a8749d3 100644 --- a/src/modes/server/api/item.rs +++ b/src/modes/server/api/item.rs @@ -74,11 +74,7 @@ pub async fn handle_list_items( .map(|item_with_meta| { let item_id = item_with_meta.item.id.unwrap_or(0); let item_tags: Vec = item_with_meta.tags.iter().map(|t| t.name.clone()).collect(); - let mut item_meta = item_with_meta.meta_as_map(); - // Add content_url to metadata - // Note: We don't have access to the host here, so we'll use a placeholder - // The user may need to provide the base URL through AppState - item_meta.insert("content_url".to_string(), format!("/api/item/{}/content", item_id)); + let item_meta = item_with_meta.meta_as_map(); ItemInfo { id: item_id, @@ -598,11 +594,7 @@ pub async fn handle_get_item_latest_meta( match item_service.find_item(vec![], tags, HashMap::new()).await { Ok(item_with_meta) => { - let mut item_meta = item_with_meta.meta_as_map(); - // Add content_url to metadata - if let Some(item_id) = item_with_meta.item.id { - item_meta.insert("content_url".to_string(), format!("/api/item/{}/content", item_id)); - } + let item_meta = item_with_meta.meta_as_map(); let response = ApiResponse { success: true, @@ -655,9 +647,7 @@ pub async fn handle_get_item_meta( match item_service.get_item(item_id).await { Ok(item_with_meta) => { - let mut item_meta = item_with_meta.meta_as_map(); - // Add content_url to metadata - item_meta.insert("content_url".to_string(), format!("/api/item/{}/content", item_id)); + let item_meta = item_with_meta.meta_as_map(); let response = ApiResponse { success: true,