Skip to content

Commit

Permalink
Fix for default operators getting overwritten by options.whitelist in…
Browse files Browse the repository at this point in the history
…stead of concat (#108)

* Fix for options.whitelist getting overwritten instead of concat

* Fixed issue with the whitelist option

Co-authored-by: Dekel Barzilay <dekelev@gmail.com>
  • Loading branch information
satyadeepk and dekelev committed Aug 26, 2020
1 parent 248fe0c commit cba1199
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,9 @@ class Service extends AdapterService {
}

const whitelist = Object.values(OPERATORS).concat(options.whitelist || []);
const id = options.model.idColumn || 'id';

super(Object.assign({
id: options.model.idColumn || 'id',
whitelist
}, options));
super(Object.assign({ id }, options, { whitelist }));

this.idSeparator = options.idSeparator || ',';
this.jsonSchema = options.model.jsonSchema;
Expand Down

0 comments on commit cba1199

Please sign in to comment.