0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Allowed filter option for findAll method

no-issue

This will allow us to constrain findAll queries, rather than using knex
`where` & `fetchAll` methods
This commit is contained in:
Fabien O'Carroll 2019-10-08 13:05:33 +07:00
parent a6354d1acb
commit 998642eb24

View file

@ -675,7 +675,7 @@ ghostBookshelf.Model = ghostBookshelf.Model.extend({
case 'findOne':
return baseOptions.concat(extraOptions, ['columns', 'require']);
case 'findAll':
return baseOptions.concat(extraOptions, ['columns']);
return baseOptions.concat(extraOptions, ['filter', 'columns']);
case 'findPage':
return baseOptions.concat(extraOptions, ['filter', 'order', 'page', 'limit', 'columns']);
default: