Skip to content

Commit

Permalink
fix(README): Update documentation on Container hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
bdfoster authored Nov 21, 2017
1 parent 1f40417 commit 3012d10
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,19 @@ const store = new Container({

/**
* A few hooks are provided for your convenience, including:
* - beforeGet
* - afterGet
* - beforeInsert
* - afterInsert
* - beforeUpdate
* - afterUpdate
* - beforeValidate
* - afterValidate
*/
beforeInsert(record) {
beforeInsert(mapper, record) {
record.createdAt = new Date();
},
beforeUpdate(record) {
beforeUpdate(mapper, record) {
record.updatedAt = new Date();
},

Expand Down

0 comments on commit 3012d10

Please sign in to comment.