Skip to content

Commit

Permalink
fix: 🐛 destroy was trying to create an item
Browse files Browse the repository at this point in the history
  • Loading branch information
nicgirault committed May 15, 2020
1 parent d3342c9 commit 9f1c3b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const crud = <M extends any>(
)
router.delete(
`${path}/:id`,
destroy((options && options.create) || (model.destroy.bind(model) as any))
destroy((options && options.destroy) || (model.destroy.bind(model) as any))
)

return router
Expand Down

0 comments on commit 9f1c3b3

Please sign in to comment.