Skip to content

Quotes in query params uuids #55

Description

@rafaelrabeloit

I'm using Backbone in back and front end.
I configured Backbone-ORM + Backbone-HTTP in my "client" web app and used Backbone-ORM + Backbone-Mongo + Backbone-REST in my REST API.
It worked fine until I tested some queries using relationship keys from my client against the REST API.

Product.find({
  category_id: '5785228fc2ad8a23481dbb75'
}, function (err, products) {
  $("body").html(JSON.stringify(products));
});

The request that is made:
http://localhost:8080/products?category_id=%225785228fc2ad8a23481dbb75%22

That means that the category_id here is interpreted as number represented in string, and therefore must be "quoted".
But I don't think that is the expected result. Even more when the restify server, with the Backbone-REST on top of it, doesn't interpret it right and the GET returns [], even though the request without the quotes return it right.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions