Skip to content

Commit

Permalink
Update packages/next-admin/src/pageHandler.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 9105334 commit 6da4123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next-admin/src/pageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export const createHandler = <P extends string = "nextadmin">({
});

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

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

0 comments on commit 6da4123

Please sign in to comment.