diff --git a/index.js b/index.js index 4baba7d..d892d42 100644 --- a/index.js +++ b/index.js @@ -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); }; diff --git a/package.json b/package.json index 1e2e9ce..1e32750 100644 --- a/package.json +++ b/package.json @@ -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": {