Skip to content

Commit

Permalink
fix: empty 'fields' params cause all keys of a resource to be exposed (
Browse files Browse the repository at this point in the history
…#270)

refactor: simplify Model.prototype.getAttributes
  • Loading branch information
zacharygolba authored Aug 5, 2016
1 parent a412aa7 commit 329309d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/packages/database/model/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,6 @@ class Model {
}

getAttributes(...keys: Array<string>): Object {
if (!keys.length) {
keys = this.constructor.attributeNames;
}

return setType(() => pick(this, ...keys));
}

Expand Down

0 comments on commit 329309d

Please sign in to comment.