mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 21:40:39 +03:00
fixed linting
This commit is contained in:
parent
35ab123499
commit
bb509ee02c
@ -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…
Reference in New Issue
Block a user