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:
co-authored by
Claude Haiku 4.5
parent
c982c983e5
commit
c0797bc45c
@@ -61,7 +61,7 @@ export async function DELETE(
|
||||
try {
|
||||
// Delete associated messages first
|
||||
await prisma.designApprovalMessage.deleteMany({
|
||||
where: { designApprovalId: params.id },
|
||||
where: { designId: params.id },
|
||||
});
|
||||
|
||||
// Delete the design approval
|
||||
|
||||
Reference in New Issue
Block a user