feat: phase 4 completed

This commit is contained in:
Yusuf İpek
2025-12-27 14:28:33 +03:00
parent 70d246bc17
commit 226935e67d
12 changed files with 510 additions and 31 deletions
+2 -1
View File
@@ -16,7 +16,7 @@ export async function PATCH(
try {
const body = await req.json();
const { title, content, recipients, checkInterval } = body;
const { title, content, recipients, checkInterval, isEncrypted } = body;
const existingMessage = await prisma.message.findUnique({
where: { id: messageId, userId: session.user.id },
@@ -40,6 +40,7 @@ export async function PATCH(
title,
content,
checkInterval,
isEncrypted: isEncrypted || existingMessage.isEncrypted,
recipients: {
create: recipients.map((email: string) => ({ email })),
},