diff --git a/CHANGELOG.md b/CHANGELOG.md index f1ccad93f6..6de1c41ffa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ ### Changes +* Rename misleading `projection` parameter into `options` in `self.find` method signature for +`@apostrophecms/any-doc-type`, `@apostrophecms/any-page-type` & `@apostrophecms/piece-type`. * Hide save button during in-context editing if the document is autopublished. * Beginning with this release, the correct `moduleName` for typical actions on the context document is automatically passed to the diff --git a/modules/@apostrophecms/any-doc-type/index.js b/modules/@apostrophecms/any-doc-type/index.js index 66238e18d4..88a68dcd02 100644 --- a/modules/@apostrophecms/any-doc-type/index.js +++ b/modules/@apostrophecms/any-doc-type/index.js @@ -2,8 +2,8 @@ module.exports = { extend: '@apostrophecms/doc-type', extendMethods(self) { return { - find(_super, req, criteria, projection) { - return _super(req, criteria, projection).type(false); + find(_super, req, criteria, options) { + return _super(req, criteria, options).type(false); } }; } diff --git a/modules/@apostrophecms/any-page-type/index.js b/modules/@apostrophecms/any-page-type/index.js index 8aecacf775..e185d72ec6 100644 --- a/modules/@apostrophecms/any-page-type/index.js +++ b/modules/@apostrophecms/any-page-type/index.js @@ -59,8 +59,8 @@ module.exports = { extendMethods(self) { return { - find(_super, req, criteria, projection) { - return _super(req, criteria, projection).type(false).isPage(true); + find(_super, req, criteria, options) { + return _super(req, criteria, options).type(false).isPage(true); }, // Returns a MongoDB projection object to be used when querying // for this type if all that is needed is a title for display diff --git a/modules/@apostrophecms/piece-type/index.js b/modules/@apostrophecms/piece-type/index.js index 6bf6b91a06..a62af592a6 100644 --- a/modules/@apostrophecms/piece-type/index.js +++ b/modules/@apostrophecms/piece-type/index.js @@ -1164,8 +1164,8 @@ module.exports = { return browserOptions; }, - find(_super, req, criteria, projection) { - return _super(req, criteria, projection).defaultSort(self.options.sort || { updatedAt: -1 }); + find(_super, req, criteria, options) { + return _super(req, criteria, options).defaultSort(self.options.sort || { updatedAt: -1 }); }, newInstance(_super) { if (!self.options.singletonAuto) {