sails-hook-sequelize-blueprints icon indicating copy to clipboard operation
sails-hook-sequelize-blueprints copied to clipboard

Add support to GET /:controller/count

Open alvaropaco opened this issue 7 years ago • 0 comments

This PR include count functionality to routes. This nus be used passing "count" string after any resource route, for example: GET /users/count

Response: It's retreive's paginated object. { "items": [ { "id": 1, "firstName": "Mini", "lastName": "Me 2", "email": "[email protected]", "birthdate": null, "genrer": null, "active": null, "created_at": "2017-08-17T17:24:27.000Z", "updated_at": "2017-08-17T17:24:27.000Z" }, { "id": 2, "firstName": "Mini", "lastName": "Me 2", "email": "[email protected]", "birthdate": null, "genrer": null, "active": null, "created_at": "2017-08-17T17:26:28.000Z", "updated_at": "2017-08-17T17:26:28.000Z" }, { "id": 3, "firstName": "Mini", "lastName": "Me 2", "email": "[email protected]", "birthdate": null, "genrer": null, "active": null, "created_at": "2017-08-17T17:26:34.000Z", "updated_at": "2017-08-17T17:26:34.000Z" } ], "page": 1, "limit": 3, "total": 11 }

alvaropaco avatar Aug 17 '17 19:08 alvaropaco