From 89ef6bc60a6439d4907f3cdbab9a8a5e454e8e23 Mon Sep 17 00:00:00 2001 From: Juan Costa Date: Wed, 10 Apr 2019 17:08:36 +0200 Subject: [PATCH] Support disabling of referencesMany relation remotes. Fix a eslint error --- setup-remote-methods.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup-remote-methods.js b/setup-remote-methods.js index dc78a3c..f4a4032 100644 --- a/setup-remote-methods.js +++ b/setup-remote-methods.js @@ -94,7 +94,8 @@ module.exports = (Model, options) => { methodsToKeep.push(method); } }); - methodsToDisable = methodsToDisable.concat(_.difference(allRelationMethods, methodsToKeep)); + methodsToDisable = methodsToDisable + .concat(_.difference(allRelationMethods, methodsToKeep)); } }); }); @@ -159,6 +160,8 @@ module.exports = (Model, options) => { 'get', 'link', 'updateById', 'unlink'], 'embedsOne': ['create', 'get', 'update', 'destroy'], 'embedsMany': ['count', 'create', 'delete', 'destroyById', 'findById', 'get', 'updateById'], + 'referencesMany': ['count', 'create', 'delete', 'destroyById', 'exists', 'findById', + 'get', 'link', 'updateById', 'unlink'], }; function getAllRelationsMethods() {