mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-05-23 15:26:36 +00:00
Await for creating a DB operation
This commit is contained in:
parent
11d98c477f
commit
8686317bf2
@ -11,8 +11,8 @@ class Operation {
|
||||
static create(ipfs, log, user, operation, key, value, data) {
|
||||
var createOperation = async(() => {
|
||||
return new Promise(async((resolve, reject) => {
|
||||
const hash = Operation._createOperation(ipfs, user, operation, key, value);
|
||||
const res = await(log.add(hash));
|
||||
const hash = await(Operation._createOperation(ipfs, user, operation, key, value));
|
||||
await(log.add(hash));
|
||||
const listHash = await(log.ipfsHash);
|
||||
resolve(listHash);
|
||||
}));
|
||||
|
Loading…
x
Reference in New Issue
Block a user