From 4006852efa44dc429c539c77be9b792a6406cc14 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Thu, 7 Aug 2025 14:10:51 -0600 Subject: [PATCH] Add comment to content --- packages/database/src/queries/reports/append-report-content.ts | 1 + packages/database/src/queries/reports/replace-report-content.ts | 1 + packages/database/src/queries/reports/update-report.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/database/src/queries/reports/append-report-content.ts b/packages/database/src/queries/reports/append-report-content.ts index c55d475b7..b69722121 100644 --- a/packages/database/src/queries/reports/append-report-content.ts +++ b/packages/database/src/queries/reports/append-report-content.ts @@ -26,6 +26,7 @@ export const appendReportContent = async ( const result = await db .update(reportFiles) .set({ + // From Nate: I was just thinking we do not KNOW if this is valid markdown... content: sql`${reportFiles.content} || ${content}`, updatedAt: new Date().toISOString(), }) diff --git a/packages/database/src/queries/reports/replace-report-content.ts b/packages/database/src/queries/reports/replace-report-content.ts index 8501687b1..6bac173d8 100644 --- a/packages/database/src/queries/reports/replace-report-content.ts +++ b/packages/database/src/queries/reports/replace-report-content.ts @@ -20,6 +20,7 @@ type ReplaceReportContentInput = z.infer export const replaceReportContent = async ( params: ReplaceReportContentInput ): Promise<{ content: string }> => { + // From Nate: I was just thinking we do not KNOW if this is valid markdown... const { reportId, findString, replaceString } = ReplaceReportContentInputSchema.parse(params); try { diff --git a/packages/database/src/queries/reports/update-report.ts b/packages/database/src/queries/reports/update-report.ts index 8743e3ea8..12ff021d6 100644 --- a/packages/database/src/queries/reports/update-report.ts +++ b/packages/database/src/queries/reports/update-report.ts @@ -64,6 +64,7 @@ export const updateReport = async ( } if (content !== undefined) { + // From Nate: I was just thinking we do not KNOW if this is valid markdown... Maybe we should accept ReportElements and then convert to markdown? Leaving this comment here for now because we are moving fast and I don't want to block the PR. updateData.content = content; }