diff options
| author | julie lala <jules@okfoc.us> | 2015-05-17 08:07:06 -0400 |
|---|---|---|
| committer | julie lala <jules@okfoc.us> | 2015-05-17 08:07:06 -0400 |
| commit | 45197dbb5a49c75509d95fae072f828bdbc7e13e (patch) | |
| tree | b9e177b49203d6e73b3c9e15f8ce59b8b32b50c8 /app/node_modules/okdb/index.js | |
| parent | 7f84dfb770ac2f9bae282ef00d9a93f21255fa45 (diff) | |
| parent | a0d2729e311f53ecaa014c097c1a485581853100 (diff) | |
Merge branch 'twohustlers' of github.com:okfocus/okcms into twohustlers
Diffstat (limited to 'app/node_modules/okdb/index.js')
| -rw-r--r-- | app/node_modules/okdb/index.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/node_modules/okdb/index.js b/app/node_modules/okdb/index.js index 5aa22a2..4820c8c 100644 --- a/app/node_modules/okdb/index.js +++ b/app/node_modules/okdb/index.js @@ -68,6 +68,9 @@ FSDB.prototype.insert = function(collection, data) { data = cloneDeep(data); // Auto-increment fields data = autoincrement(wrapped, schema, data); + // Record date created + // TODO Should this meta prop logic be moved out of the DB? + data.dateCreated = new Date().toUTCString(); var result = wrapped.chain().push(data).last().value(); if (result) { |
