strapi-sdk-javascript
strapi-sdk-javascript copied to clipboard
[FIX] Allow array filters in get requests
- What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix : allow array filtering while requesting entries
Arrays are sent to strapi with multiple parameters with the same name (not suffixed with [xxx])
Actually, you can't send to strapi the following request using the sdk : http://localhost:1337/themes?tags_in=2&tags_in=1
With this PR, you can :
strapi.getEntries("themes", { tags_in: [2,1] })
-
What is the current behavior? (You can also link to an open issue here) https://github.com/strapi/strapi-sdk-javascript/issues/67
-
What is the new behavior (if this is a feature change)?
Multiple params with the same name are sent to strapi, allowing filters like in
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
Pierre-Louis Duhoux seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.