From 1f99018af552904b1505a652bda58082b589b1bc Mon Sep 17 00:00:00 2001 From: Satyadeep Date: Mon, 17 Aug 2020 01:27:37 +0530 Subject: [PATCH 1/2] Fix for options.whitelist getting overwritten instead of concat --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index b8679ce..2ff907d 100644 --- a/src/index.js +++ b/src/index.js @@ -84,7 +84,7 @@ class Service extends AdapterService { } const whitelist = Object.values(OPERATORS).concat(options.whitelist || []); - + delete options.whitelist; super(Object.assign({ id: options.model.idColumn || 'id', whitelist From e64a56d5cbd6f49aadc72801b5f8c13b3d7474bb Mon Sep 17 00:00:00 2001 From: Dekel Barzilay Date: Wed, 26 Aug 2020 18:48:06 +0300 Subject: [PATCH 2/2] Fixed issue with the whitelist option --- src/index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index 2ff907d..264bc77 100644 --- a/src/index.js +++ b/src/index.js @@ -84,11 +84,9 @@ class Service extends AdapterService { } const whitelist = Object.values(OPERATORS).concat(options.whitelist || []); - delete options.whitelist; - super(Object.assign({ - id: options.model.idColumn || 'id', - whitelist - }, options)); + const id = options.model.idColumn || 'id'; + + super(Object.assign({ id }, options, { whitelist })); this.idSeparator = options.idSeparator || ','; this.jsonSchema = options.model.jsonSchema;