From 069f3863769db339749339ab776350ad87e31538 Mon Sep 17 00:00:00 2001 From: David Luecke Date: Mon, 14 Nov 2016 21:02:37 -0800 Subject: [PATCH] Do not delete model ids --- package.json | 2 +- src/service.js | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/package.json b/package.json index 8b48f4fc..cba55da5 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "feathers": "^2.0.0", "feathers-hooks": "^1.1.0", "feathers-rest": "^1.5.2", - "feathers-service-tests": "^0.9.0", + "feathers-service-tests": "^0.9.1", "feathers-socketio": "^1.3.3", "istanbul": "^1.1.0-alpha.1", "mocha": "^3.0.0", diff --git a/src/service.js b/src/service.js index 2c254f08..3359c1dc 100644 --- a/src/service.js +++ b/src/service.js @@ -160,19 +160,6 @@ class Service { } create (data, params) { - const convert = current => { - const result = Object.assign({}, current); - delete result[this.id]; - - return result; - }; - - if (Array.isArray(data)) { - data = data.map(convert); - } else { - data = convert(data); - } - return this.Model.create(data) .then(select(params, this.id)) .catch(errorHandler);