3meters / proxibase

Patchr web service
1 stars 0 forks source link

Limit param on links query not respected #431

Closed Jaymassena closed 8 years ago

Jaymassena commented 8 years ago

Run query below and inspect patches returned. Look at Massena Time (pa.141217.64338.917.204313). The links collections contains over thirty content links but limit is set to one.

https://api.aircandi.com/v1/patches/near

{
  "session": "079051d0a31803545c812ac3e038d4a08fc3d114",
  "radius": 10000,
  "location": {
    "accuracy": 20.894,
    "lat": 47.5936039,
    "geometry": [
      -122.1595328,
      47.5936039
    ],
    "lng": -122.1595328
  },
  "linkCount": [
    {
      "from": "messages",
      "type": "content"
    },
    {
      "from": "users",
      "enabled": true,
      "type": "watch"
    },
    {
      "from": "users",
      "enabled": false,
      "type": "watch"
    }
  ],
  "links": [
    {
      "fields": "_id,type,enabled,mute,schema",
      "from": "users",
      "filter": {
        "_from": "us.000000.00000.000.000001"
      },
      "type": "watch"
    },
    {
      "filter": {
        "_creator": "us.000000.00000.000.000001"
      },
      "fields": "_id,type,schema",
      "from": "messages",
      "type": "content",
      "limit": 1
    }
  ],
  "refs": {
    "_owner": "_id,name,photo,schema,type"
  },
  "rest": true,
  "skip": 0,
  "user": "us.000000.00000.000.000001",
  "more": false,
  "limit": 50
}
georgesnelling commented 8 years ago

Fixed with 4.2.2. Pushed to prod.