refactors to UX
This commit is contained in:
parent
508a8bfc3c
commit
70d306242e
5 changed files with 41 additions and 22 deletions
|
|
@ -30,11 +30,17 @@ Profile.key = function(hash) {
|
|||
|
||||
Profile.create = function(email, password, storage, cb) {
|
||||
preconditions.checkArgument(cb);
|
||||
preconditions.checkArgument(storage.setPassphrase);
|
||||
|
||||
preconditions.checkState(storage.hasPassphrase());
|
||||
|
||||
var p = new Profile({
|
||||
email: email,
|
||||
hash: Profile.hash(email,password),
|
||||
}, storage);
|
||||
p.store({}, cb);
|
||||
p.store({}, function(err) {
|
||||
return cb(err,p);
|
||||
});
|
||||
};
|
||||
|
||||
Profile.open = function(email, password, storage, cb) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue