Skip to content

Commit c3c5866

Browse files
greenkeeperio-botdaffl
authored andcommitted
Update feathers-service-tests to version 0.6.0 🚀 (#27)
* chore(package): update feathers-service-tests to version 0.6.0 * Add paginate to params
1 parent f3f4e93 commit c3c5866

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"body-parser": "^1.14.1",
5656
"feathers": "^2.0.0-pre.4",
5757
"feathers-rest": "^1.2.2",
58-
"feathers-service-tests": "^0.5.0",
58+
"feathers-service-tests": "^0.6.0",
5959
"feathers-socketio": "^1.3.3",
6060
"jshint": "^2.8.0",
6161
"mocha": "^2.5.0",

src/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,12 @@ class Service {
7676
}
7777

7878
find(params) {
79+
const paginate = typeof params.paginate !== 'undefined' ?
80+
params.paginate : this.paginate;
7981
// Call the internal find with query parameter that include pagination
80-
const result = this._find(params, query => filter(query, this.paginate));
82+
const result = this._find(params, query => filter(query, paginate));
8183

82-
if(!this.paginate.default) {
84+
if(!(paginate && paginate.default)) {
8385
return result.then(page => page.data);
8486
}
8587

0 commit comments

Comments
 (0)