Skip to content

Fixing issue with DELETE and PUT METHOD were working without any params.id #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kunalmestri9
Copy link

Fixing issue #144

As issue mentioned from the DELETE method you were able to delete entire collection data just by skipping the OBJECT ID in the URL

Fix it in both handlers PUT and DELETE. Now for PUT and DELETE request.params.id is mandatory if not it will throw 400 [bad request]

However for development purpose and any other such reasons I have kept a parameter in

defaults.isSecureDelete=true

which can be overridden at the time of the model creation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant