refactor iden #create
This commit is contained in:
parent
d84808f0c7
commit
606ea0668c
10 changed files with 72 additions and 54 deletions
|
|
@ -24,7 +24,18 @@ Profile.hash = function(email, password) {
|
|||
};
|
||||
|
||||
Profile.key = function(hash) {
|
||||
return 'identity::' + hash;
|
||||
return 'profile::' + hash;
|
||||
};
|
||||
|
||||
|
||||
Profile.create = function(email, password, storage, cb) {
|
||||
preconditions.checkArgument(cb);
|
||||
var p = new Profile({
|
||||
email: email,
|
||||
hash: Profile.hash(email,password),
|
||||
}, storage);
|
||||
|
||||
p.store(cb);
|
||||
};
|
||||
|
||||
Profile.open = function(email, password, storage, cb) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue