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:
@@ -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). */
|
||||
|
||||
Reference in New Issue
Block a user