From bf67a93b3128ed68190d5dc33867226abf3bc060 Mon Sep 17 00:00:00 2001 From: Henry Winkel Date: Sat, 16 May 2026 20:42:22 +0200 Subject: [PATCH] feat: add notes field to stocks API upsert --- app/routes/api/stocks/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/routes/api/stocks/index.ts b/app/routes/api/stocks/index.ts index 2e22706..e304336 100644 --- a/app/routes/api/stocks/index.ts +++ b/app/routes/api/stocks/index.ts @@ -28,6 +28,7 @@ export async function action({ request }: { request: Request }) { const lastExplanation = formData.get("lastExplanation")?.toString(); const lastExecutionPlan = formData.get("lastExecutionPlan")?.toString(); const lastJobId = formData.get("lastJobId")?.toString(); + const notes = formData.get("notes")?.toString(); // Upsert the stock record so ticker is ensured and optional fields are saved const stock = await db.stock.upsert({ @@ -37,6 +38,7 @@ export async function action({ request }: { request: Request }) { lastExplanation: lastExplanation ?? undefined, lastExecutionPlan: lastExecutionPlan ?? undefined, lastJobId: lastJobId ?? undefined, + notes: notes ?? undefined, }, create: { ticker, @@ -44,6 +46,7 @@ export async function action({ request }: { request: Request }) { lastExplanation: lastExplanation ?? undefined, lastExecutionPlan: lastExecutionPlan ?? undefined, lastJobId: lastJobId ?? undefined, + notes: notes ?? undefined, }, });