From fc044bfa9a98e49ab2ba6e782d4df7470d082683 Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Tue, 7 Apr 2015 12:36:29 -0400 Subject: Add admin configuration --- app/node_modules/okdb/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/node_modules/okdb/index.js') diff --git a/app/node_modules/okdb/index.js b/app/node_modules/okdb/index.js index cf670c1..6c01df0 100644 --- a/app/node_modules/okdb/index.js +++ b/app/node_modules/okdb/index.js @@ -37,9 +37,13 @@ function FSDB(options) { this._db = low(filename); } -FSDB.prototype._resolve = function(data) { +FSDB.prototype._resolve = function(data, success) { + success = typeof success === 'undefined' ? true : success; return Q.Promise(function resolvePromise(resolve, reject) { - resolve(data); + if (success) + resolve(data); + else + reject(data); }); }; -- cgit v1.2.3-70-g09d2