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

support multiple include query params #130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

tkellen
Copy link

@tkellen tkellen commented Jun 26, 2015

Also needs to be taken into account for all other params (esp sort). Just opening this so the solution is ready.

More generally, I need to write unit tests for the whole request handler and we need an integration test for this behavior /cc @bobholt.

closes gh-129

@@ -1,4 +1,5 @@
export default function (includes) {
export default function (input) {
const includes = Array.isArray(input) ? input : input.split(',');
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't account for if the value is an object, which could happen with ?include[thing]=x&include[otherthing]=y

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! He actually wrote this algo, too :)

@sgraham785
Copy link

any chances of this getting merged?

@tkellen
Copy link
Author

tkellen commented May 26, 2016

@sgraham785 are you interested in being a collaborator on this repo and landing/publishing this yourself?

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.

crashes when the same query param is used twice
3 participants