mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
fixed linting
This commit is contained in:
parent
35ab123499
commit
bb509ee02c
2 changed files with 5 additions and 3 deletions
|
@ -82,6 +82,7 @@ module.exports = function (Bookshelf) {
|
|||
const options = this.filterOptions(unfilteredOptions, 'findPage');
|
||||
const itemCollection = this.getFilteredCollection(options);
|
||||
const requestedColumns = options.columns;
|
||||
requiredForExcerpt(requestedColumns);
|
||||
|
||||
// Set this to true or pass ?debug=true as an API option to get output
|
||||
itemCollection.debug = unfilteredOptions.debug && process.env.NODE_ENV !== 'production';
|
||||
|
@ -137,6 +138,10 @@ module.exports = function (Bookshelf) {
|
|||
data = this.filterData(data);
|
||||
const model = this.forge(data);
|
||||
|
||||
const requestedColumns = options.columns;
|
||||
// make sure we include plaintext and custom_excerpt if excerpt is requested
|
||||
requiredForExcerpt(requestedColumns);
|
||||
|
||||
// @NOTE: The API layer decides if this option is allowed
|
||||
if (options.filter) {
|
||||
model.applyDefaultAndCustomFilters(options);
|
||||
|
|
|
@ -52,6 +52,3 @@ describe('Unit: canary/utils/serializers/output/utils/extra-attrs', function ()
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue