mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
Permitted mongoTransformer option for read methods
refs #10922 This will allow us to pass through a customer transformer to replace references to removed columns in the mongo query generated inside of NQL
This commit is contained in:
parent
51fb0815b4
commit
a89376bf26
@ -686,11 +686,11 @@ ghostBookshelf.Model = ghostBookshelf.Model.extend({
|
||||
case 'edit':
|
||||
return baseOptions.concat(extraOptions, ['id', 'require']);
|
||||
case 'findOne':
|
||||
return baseOptions.concat(extraOptions, ['columns', 'require']);
|
||||
return baseOptions.concat(extraOptions, ['columns', 'require', 'mongoTransformer']);
|
||||
case 'findAll':
|
||||
return baseOptions.concat(extraOptions, ['columns']);
|
||||
return baseOptions.concat(extraOptions, ['columns', 'mongoTransformer']);
|
||||
case 'findPage':
|
||||
return baseOptions.concat(extraOptions, ['filter', 'order', 'page', 'limit', 'columns']);
|
||||
return baseOptions.concat(extraOptions, ['filter', 'order', 'page', 'limit', 'columns', 'mongoTransformer']);
|
||||
default:
|
||||
return baseOptions.concat(extraOptions);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user