API Updates
Deploy / deploy (push) Successful in 3m3s

This commit is contained in:
twotalesanimation
2026-07-08 14:38:56 +02:00
parent d40ca8eb55
commit afcef02409
9 changed files with 399 additions and 4 deletions
+5
View File
@@ -6,6 +6,7 @@ import { revalidatePath } from "next/cache";
import { z } from "zod";
import { notifyFeedbackAdded, notifyCommentReply } from "@/lib/notifications";
import { slackNotifyNewFeedback } from "@/lib/slack";
import { createDisplayEvent } from "@/lib/display-events";
const addCommentSchema = z.object({
versionId: z.string().cuid(),
@@ -79,6 +80,10 @@ export async function addComment(data: z.infer<typeof addCommentSchema>) {
});
}
// Display board event
const commenter = await db.user.findUnique({ where: { id: session.user.id }, select: { name: true } });
await createDisplayEvent("COMMENT", shotCode, commenter?.name ?? session.user.email ?? "Someone");
revalidatePath(`/review/${parsed.versionId}`);
return { success: true, comment };
}