feat(push): notify on defect filed without delaying the response

Send fire-and-forget via event.waitUntil after the row is created, so
filing latency is unaffected. (T11/F7)
This commit is contained in:
Julien Calixte
2026-05-28 01:51:41 +02:00
parent b56577ddc2
commit 7c755740b9
2 changed files with 22 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ export interface NewDefect {
/** Persist a filed defect and return the stored row. */
export async function createDefect(db: Db, input: NewDefect) {
const [row] = await db.insert(defects).values(input).returning()
return row
return row!
}
/** Recent defects, newest first — the dashboard feed (F5/F6). */