Skip to content

Commit

Permalink
Relation methods using filter fixed;
Browse files Browse the repository at this point in the history
  • Loading branch information
darthwesker committed Jan 9, 2019
1 parent 4b921d0 commit 76e8402
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ module.exports = function(app, options) {
const pattern = options &&
Array.isArray(options.pattern) ? options.pattern : ['*.find'];
for (let i = pattern.length - 1; i >= 0; i--) {
remotes.after(pattern[i], applyModelRange);
remotes.before(pattern[i], applyModelRange);
}

const relatedModels = options &&
options.relatedModels !== undefined ? options.relatedModels : true;

if (relatedModels)
remotes.after('*.prototype.*', applyRelationRange);
remotes.before('*.prototype.*', applyRelationRange);
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "loopback-content-range",
"version": "1.0.0",
"version": "1.0.1",
"description": "Add Content header to all search requests for Loopback 3",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 76e8402

Please sign in to comment.