Fix field name in DELETE endpoint - use designId not designApprovalId

The DesignApprovalMessage model uses designId as the foreign key,
not designApprovalId.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Andymick
2026-07-18 19:13:57 +01:00
co-authored by Claude Haiku 4.5
parent c982c983e5
commit c0797bc45c
+1 -1
View File
@@ -61,7 +61,7 @@ export async function DELETE(
try { try {
// Delete associated messages first // Delete associated messages first
await prisma.designApprovalMessage.deleteMany({ await prisma.designApprovalMessage.deleteMany({
where: { designApprovalId: params.id }, where: { designId: params.id },
}); });
// Delete the design approval // Delete the design approval