summaryrefslogtreecommitdiff
path: root/app/node_modules/okdb/index.js
diff options
context:
space:
mode:
authorSean Fridman <fridman@mail.sfsu.edu>2015-04-07 12:36:29 -0400
committerSean Fridman <fridman@mail.sfsu.edu>2015-04-07 12:36:29 -0400
commitfc044bfa9a98e49ab2ba6e782d4df7470d082683 (patch)
tree9e440acee9784741b11d4d6d96ce43daee030de6 /app/node_modules/okdb/index.js
parent21167ce88ea4ad594d213d3a49115f0ebbaed745 (diff)
Add admin configuration
Diffstat (limited to 'app/node_modules/okdb/index.js')
-rw-r--r--app/node_modules/okdb/index.js8
1 files changed, 6 insertions, 2 deletions
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);
});
};