diff --git a/core/server/models/base/index.js b/core/server/models/base/index.js index 1d9e3e68c0..b72e600109 100644 --- a/core/server/models/base/index.js +++ b/core/server/models/base/index.js @@ -515,7 +515,7 @@ ghostBookshelf.Model = ghostBookshelf.Model.extend({ case 'findAll': return baseOptions.concat(extraOptions, ['columns']); case 'findPage': - return baseOptions.concat(extraOptions, ['filter']); + return baseOptions.concat(extraOptions, ['filter', 'order', 'page', 'limit', 'columns']); default: return baseOptions.concat(extraOptions); } diff --git a/core/server/models/post.js b/core/server/models/post.js index 2fa7feef49..40a9264363 100644 --- a/core/server/models/post.js +++ b/core/server/models/post.js @@ -658,7 +658,7 @@ Post = ghostBookshelf.Model.extend({ // these are the only options that can be passed to Bookshelf / Knex. validOptions = { findOne: ['columns', 'importing', 'withRelated', 'require'], - findPage: ['page', 'limit', 'columns', 'order', 'status', 'staticPages'], + findPage: ['status', 'staticPages'], findAll: ['columns', 'filter'], destroy: ['destroyAll'] }; diff --git a/core/server/models/subscriber.js b/core/server/models/subscriber.js index d0a40d504a..f5b087753b 100644 --- a/core/server/models/subscriber.js +++ b/core/server/models/subscriber.js @@ -42,7 +42,6 @@ Subscriber = ghostBookshelf.Model.extend({ // whitelists for the `options` hash argument on methods, by method name. // these are the only options that can be passed to Bookshelf / Knex. validOptions = { - findPage: ['page', 'limit', 'columns', 'order'], findAll: ['columns'] }; diff --git a/core/server/models/tag.js b/core/server/models/tag.js index 62fed24415..45d7428924 100644 --- a/core/server/models/tag.js +++ b/core/server/models/tag.js @@ -74,7 +74,6 @@ Tag = ghostBookshelf.Model.extend({ // whitelists for the `options` hash argument on methods, by method name. // these are the only options that can be passed to Bookshelf / Knex. validOptions = { - findPage: ['page', 'limit', 'columns', 'order'], findAll: ['columns'], findOne: ['visibility'], destroy: ['destroyAll'] diff --git a/core/server/models/user.js b/core/server/models/user.js index 0e36039b78..bdf5f2c668 100644 --- a/core/server/models/user.js +++ b/core/server/models/user.js @@ -338,7 +338,7 @@ User = ghostBookshelf.Model.extend({ setup: ['id'], edit: ['withRelated', 'importPersistUser'], add: ['importPersistUser'], - findPage: ['page', 'limit', 'columns', 'order', 'status'], + findPage: ['status'], findAll: ['filter'] };