Skip to content
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

Fixed issue #337 and included relevant test - ignore missing id when … #338

Merged
merged 3 commits into from
Jan 20, 2018

Conversation

Protoss78
Copy link
Contributor

@Protoss78 Protoss78 commented Jan 19, 2018

…query is used.

Summary

PR fixess issue #337
StashBefore now does not throw an error when the id is missing but a query parameter is present.
Test script was updated with a scenario where all documents are removed, by passing no id and an empty query object.

@eddyystop
Copy link
Collaborator

eddyystop commented Jan 19, 2018

Do you think it would be cleaner to move

if (context.id === null || context.id === undefined) {
  throw new errors.BadRequest('Id is required. (stashBefore)');
}

to after the 'if' clause folllowing it?

Could you bump the patch semver to 4.2.3?

And thanks for this catch!

@eddyystop eddyystop added the bug label Jan 19, 2018
@Protoss78
Copy link
Contributor Author

Added the version bump and moved the if statement. Definitely cleaner after the $disableStashBefore validation.

@eddyystop eddyystop merged commit e67eb8a into feathersjs-ecosystem:master Jan 20, 2018
@eddyystop
Copy link
Collaborator

Thanks for this!

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

Successfully merging this pull request may close these issues.

2 participants