Skip to content

Conversation

@pmcnr-hx
Copy link
Contributor

See #131 for review.

Updating changelog and bumping version for release.

pmcnr-hx added 10 commits May 27, 2016 14:12
Extract individual filter validations into helper functions for more
modular and readable code.
We only meant to skip validation for nested filters, but we were
actually skipping array values (multiple values for a property) which
should not be skipped.
Filters should always be valid when we get to the post-processing stage
so remove the redundant check.
Parse and validate using Joi the filter elements, so this work is only
done in one place and the parsed filters can be provided to the
handlers, avoid the need to redo that work there as is currently needed.
The test was passing previously by accident. Once the filter is
corrected to include a valid email address, it breaks because the filter
isn't being passed to the related resource rerouted request. Fix the
test and pass the query string (including the filter) to related
resources.
The more generic nature of its functionality warrants the rename.
@pmcnr-hx pmcnr-hx merged commit 0acd35b into master May 27, 2016
@pmcnr-hx pmcnr-hx deleted the parse-and-joi-validate-search-filter branch May 27, 2016 13:29
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.

2 participants