strongloop / strong-remoting

Communicate between objects in servers, mobile apps, and other servers.
www.strongloop.com
Other
105 stars 93 forks source link

Fix query string to have null #378

Closed kobaska closed 7 years ago

kobaska commented 7 years ago

Fix to allow query string to have null. At the moment doing a find such as below would not work as qs.stringify function would remove the null from the query.

SomeModel.find({where: {name: null}});

Instead using JSON.stringify with encodeURI

slnode commented 7 years ago

Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test."

slnode commented 7 years ago

Can one of the admins verify this patch?

slnode commented 7 years ago

Can one of the admins verify this patch?

slnode commented 7 years ago

Can one of the admins verify this patch?

Amir-61 commented 7 years ago

@slnode test please

Amir-61 commented 7 years ago

Just a side note: In LB3.x we have worked on coercion and made both conversion and coercion more strict. null value is accepted only for "object", "array" and "any". I see you sent this PR against 2.x. Could you please add test to verify the changes.

horiaradu commented 7 years ago

I think this will be fixed with: https://github.com/strongloop/strong-remoting/pull/325

gunjpan commented 7 years ago

@kobaska : Thank you for your pull request. PR# 325, as mentioned by @horiaradu, addresses the same issue and it is ready to land.

Re. your PR, please see the comments here: https://github.com/strongloop/strong-remoting/pull/325#issuecomment-256615491

For future reference, please add test cases along with your code to get the PR review started. See the code contribution guidelines for LoopBack here.

Closing in favor of #325.

gunjpan commented 7 years ago

cc/ @Amir-61

kobaska commented 7 years ago

@gunjpan Yep will do, thanks :)