More refactoring

This commit is contained in:
haad
2023-04-06 14:27:13 +03:00
parent eddf5b853b
commit 3030336db9
11 changed files with 67 additions and 81 deletions

View File

@@ -38,7 +38,7 @@ const Database = async ({ ipfs, identity, address, name, access, directory, meta
const entry = await log.append(op, { referencesCount })
await sync.add(entry)
if (onUpdate) {
await onUpdate(entry)
await onUpdate(log, entry)
}
events.emit('update', entry)
return entry.hash
@@ -55,7 +55,7 @@ const Database = async ({ ipfs, identity, address, name, access, directory, meta
const updated = await log.joinEntry(entry)
if (updated) {
if (onUpdate) {
await onUpdate(entry)
await onUpdate(log, entry)
}
events.emit('update', entry)
}