From 76e8402e1dab57b1ed4e3b6fae1195e87f4bb9eb Mon Sep 17 00:00:00 2001 From: Carlos Almeida Date: Wed, 9 Jan 2019 17:10:56 +0000 Subject: [PATCH] Relation methods using filter fixed; --- index.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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": {