Skip to content

Conversation

darrenkidd
Copy link

@darrenkidd darrenkidd commented Nov 9, 2020

This is my proposed fix for #91.

Happy to remove some of the extra test scripts and documentation; wanted them there to start with so I couldn't lose them and so others could see the full source.

All tests were passing when I pushed.

EDIT: motivation for this is that I have an afterSave hook that relies on identifying when a particular value has been incremented. Without this fix it's impossible for me to unit test that behaviour, so thought I'd give it a go.

Rather than have beforeSave do a manual look up of the object
in the collection, this approach leaves all of that to handlePutRequest,
which is the only method that deals in updates (vs creates).
@darrenkidd darrenkidd changed the title After save request original object Provide request.original object to afterSave hook as per real Parse Server behaviour Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant