check if there is not profile, to redir
This commit is contained in:
parent
bdaf40de48
commit
b03a3f1391
9 changed files with 52 additions and 28 deletions
|
|
@ -43,6 +43,13 @@ Profile.create = function(email, password, storage, cb) {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
Profile.any = function(storage, cb) {
|
||||
storage.getFirst(Profile.key(''), function(err, val) {
|
||||
return cb(val ? true : false);
|
||||
});
|
||||
};
|
||||
|
||||
Profile.open = function(email, password, storage, cb) {
|
||||
preconditions.checkArgument(cb);
|
||||
preconditions.checkState(storage.hasPassphrase());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue