Skip to content

limit = 0 is not work in installations #1755

Closed
@ssk7833

Description

@ssk7833

Environment Setup

  • Server:
    • parse-server: 2.2.9
    • operating system: Windows 7
    • local
  • Database: mongoDB 3.2.4 local

Steps to reproduce

After count problem solved #1726, I want to get the count only so add the limit parameter, but it didn't work.

$ curl -X GET \ 
  -H "X-Parse-Application-Id: myAppId" \
  -H "X-Parse-Master-Key: myMasterKey" \
  http://localhost:1337/parse/installations/?count=1&limit=0

This is what I got:

{
  results: [
    ...my installations...
  ],
  count: 5
}

But what I expected is like current Parse REST API when I use the command below:

$ curl -X GET \
  -H "X-Parse-Application-Id: myAppId" \
  -H "X-Parse-Master-Key: myMasterKey" \
  -H "X-Parse-REST-API-Key: myRestApiKey" \
  https://api.parse.com/1/installations/?count=1&limit=0

It response with installations count like this:

{
  results: [],
  count: 5
}

I tried that parameter like limit = 1 limit = 2 worked good, only 0 not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions