From 5893fd1ef126f34ff3591e637259658b0945320a Mon Sep 17 00:00:00 2001 From: Dekel Barzilay Date: Fri, 15 Feb 2019 14:07:09 +0200 Subject: [PATCH] Refactor idColumn use and bumped version to 3.1.2 --- package-lock.json | 2 +- package.json | 2 +- src/index.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b2388c0..0aae101 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "feathers-objection", - "version": "3.1.1", + "version": "3.1.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index caa7ca4..ecc48ee 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "feathers-objection", "description": "A service plugin for ObjectionJS an ORM based on KnexJS", - "version": "3.1.1", + "version": "3.1.2", "homepage": "https://github.com/feathersjs-ecosystem/feathers-objection", "keywords": [ "feathers", diff --git a/src/index.js b/src/index.js index eec4a98..e5ea85e 100644 --- a/src/index.js +++ b/src/index.js @@ -59,9 +59,9 @@ class Service extends AdapterService { const whitelist = Object.values(OPERATORS).concat(options.whitelist || []); super(Object.assign({ - id: 'id', + id: options.model.idColumn || 'id', whitelist - }, { id: options.model.idColumn, ...options })); + }, options)); this.idSeparator = options.idSeparator || ','; this.jsonSchema = options.model.jsonSchema;