From f7ce3d2b226a5c950528c762adcb58c2fb457af1 Mon Sep 17 00:00:00 2001 From: Cameron Cordes Date: Sun, 10 May 2026 15:19:37 -0400 Subject: [PATCH] knowledge: include library_id in photo_links response The PhotoLinkDetail in /knowledge/entities/{id} was dropping the library_id field, leaving consumers no way to construct a content-routed thumbnail URL. Apollo's curation screen was falling through to library=0 (the FastAPI default) and getting 400s. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/knowledge.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/knowledge.rs b/src/knowledge.rs index f37ed1e..49ff307 100644 --- a/src/knowledge.rs +++ b/src/knowledge.rs @@ -98,6 +98,7 @@ pub struct FactDetail { #[derive(Serialize)] pub struct PhotoLinkDetail { + pub library_id: i32, pub file_path: String, pub role: String, } @@ -105,6 +106,7 @@ pub struct PhotoLinkDetail { impl From for PhotoLinkDetail { fn from(l: EntityPhotoLink) -> Self { PhotoLinkDetail { + library_id: l.library_id, file_path: l.file_path, role: l.role, }