mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-05-22 14:56:38 +00:00
Use await version of use()
This commit is contained in:
parent
33c084921d
commit
6197b857f0
@ -21,14 +21,10 @@ class OrbitDB {
|
|||||||
/* Public methods */
|
/* Public methods */
|
||||||
use(channel, user, password) {
|
use(channel, user, password) {
|
||||||
this.user = user;
|
this.user = user;
|
||||||
|
this._logs[channel] = await(Log.create(this._ipfs, this.user.username));
|
||||||
this.events[channel] = new EventEmitter();
|
this.events[channel] = new EventEmitter();
|
||||||
return Log.create(this._ipfs, this.user.username)
|
Cache.loadCache(this.options.cacheFile);
|
||||||
.then((res) => {
|
this.sync(channel, Cache.get(channel));
|
||||||
this._logs[channel] = res;
|
|
||||||
Cache.loadCache(this.options.cacheFile);
|
|
||||||
this.sync(channel, Cache.get(channel));
|
|
||||||
return;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sync(channel, hash) {
|
sync(channel, hash) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user