add createdAt/updatedAt dates
This commit is contained in:
parent
27bedce5ba
commit
91a59fa5ad
|
@ -327,8 +327,8 @@ function wrap(db, dir, dbsMap) {
|
|||
return PromiseA.reject(new Error("no id supplied"));
|
||||
}
|
||||
|
||||
obj.created_at = Date.now();
|
||||
obj.updated_at = Date.now();
|
||||
obj.createdAt = Date.now();
|
||||
obj.updatedAt = Date.now();
|
||||
|
||||
return new PromiseA(function (resolve, reject) {
|
||||
var json = JSON.stringify(obj);
|
||||
|
@ -441,6 +441,8 @@ function wrap(db, dir, dbsMap) {
|
|||
}
|
||||
|
||||
DB.set = function (id, obj) {
|
||||
obj.updatedAt = Date.now();
|
||||
|
||||
var json = JSON.stringify(obj);
|
||||
var data = JSON.parse(json);
|
||||
|
||||
|
|
Loading…
Reference in New Issue