@@ -0,0 +1,15 @@
|
||||
import { db } from "@/lib/db";
|
||||
|
||||
export type DisplayEventType = "APPROVED" | "CHANGES" | "COMMENT" | "REJECTED";
|
||||
|
||||
export async function createDisplayEvent(
|
||||
type: DisplayEventType,
|
||||
shotCode: string,
|
||||
by: string
|
||||
): Promise<void> {
|
||||
try {
|
||||
await db.displayEvent.create({ data: { type, shotCode, by } });
|
||||
} catch {
|
||||
// Non-critical — never let display events break the main flow
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user