Skip to content

Commit

Permalink
Do not delete model ids
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Nov 15, 2016
1 parent f2762fc commit 069f386
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
13 changes: 0 additions & 13 deletions src/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 069f386

Please sign in to comment.