add onlyKey opts to storage #getFirst

This commit is contained in:
Matias Alejo Garcia 2014-10-20 10:00:10 -03:00
commit e109550d9b
4 changed files with 15 additions and 7 deletions

View file

@ -175,7 +175,7 @@ Wallet.key = function(str) {
Wallet.any = function(storage, cb) {
storage.getFirst(Wallet.key(''), function(err, v, k) {
storage.getFirst(Wallet.key(''), { onlyKey: true}, function(err, v, k) {
return cb(k ? true : false);
});
};
@ -259,7 +259,7 @@ Wallet.read = function(walletId, readOpts, cb) {
err;
var obj = {};
storage.getFirst(Wallet.key(walletId), function(err, ret) {
storage.getFirst(Wallet.key(walletId), {}, function(err, ret) {
if (err) return cb(err);
if (!ret)