mirror of
https://github.com/yusufipk/dead-man-switch-2.0.git
synced 2026-09-11 09:26:07 +00:00
feat: phase 4 completed
This commit is contained in:
@@ -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 })),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user