From 2fbda6ea0b2c373810507c58608c51df43ebf5cf Mon Sep 17 00:00:00 2001 From: Ada Date: Thu, 30 Apr 2026 04:15:54 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20include=20author=5Fname?= =?UTF-8?q?=20+=20author=5Fkind=20in=20public=20/lab-notes=20SELECTs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The v_lab_notes view exposes author_name + author_kind (added in PR #28), and the LabNoteView mapper renders them into the response's `author` field — but the public endpoint SELECTs were never updated to ask for those columns. Result: every public response was missing the `author` field even when the underlying row had it set. Add author_name + author_kind to: - GET /lab-notes (both sqlAll + sqlByLocale paths) - GET /lab-notes/:slug Mapper already handles them (returns `author: { kind, name? }` when author_kind is truthy), so no other changes needed. ironkitsune.tech (and any other public consumer) will now see `author` in the response instead of "UNKNOWN" fallbacks. Co-authored-by: Sage --- src/routes/labNotesRoutes.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/routes/labNotesRoutes.ts b/src/routes/labNotesRoutes.ts index 55cf40e..38ef461 100644 --- a/src/routes/labNotesRoutes.ts +++ b/src/routes/labNotesRoutes.ts @@ -37,7 +37,8 @@ export function registerLabNotesRoutes(app: any, db: Database.Database) { id, slug, locale, type, status, title, subtitle, summary, excerpt, department_id, dept, shadow_density, safer_landing, read_time_minutes, - published_at, created_at, updated_at, card_style + published_at, created_at, updated_at, card_style, + author_name, author_kind FROM v_lab_notes WHERE status = 'published' ${typeClause} @@ -49,7 +50,8 @@ export function registerLabNotesRoutes(app: any, db: Database.Database) { id, slug, locale, type, status, title, subtitle, summary, excerpt, department_id, dept, shadow_density, safer_landing, read_time_minutes, - published_at, created_at, updated_at, card_style + published_at, created_at, updated_at, card_style, + author_name, author_kind FROM v_lab_notes WHERE locale = ? AND status = 'published' @@ -102,6 +104,7 @@ export function registerLabNotesRoutes(app: any, db: Database.Database) { department_id, dept, shadow_density, coherence_score, safer_landing, read_time_minutes, published_at, created_at, updated_at, card_style, + author_name, author_kind, content_markdown FROM v_lab_notes WHERE slug = ?