Skip to content

Commit

Permalink
Update packages/next-admin/src/appHandler.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Regourd Colin <[email protected]>
  • Loading branch information
foyarash and cregourd authored Feb 3, 2025
1 parent a984862 commit 92a4001
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/next-admin/src/appHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,7 @@ export const createHandler = <P extends string = "nextadmin">({
});

if (!deleted) {
return NextResponse.json(
{ error: "Deletion failed" },
{ status: 500 }
);
throw new Error('Deletion failed')
}

return NextResponse.json({ ok: true });
Expand Down

0 comments on commit 92a4001

Please sign in to comment.