mirror of
https://github.com/colanode/colanode.git
synced 2025-12-29 00:25:03 +01:00
Fix an await in database service init
This commit is contained in:
@@ -35,7 +35,7 @@ class DatabaseService {
|
||||
public async getWorkspaceDatabase(
|
||||
userId: string
|
||||
): Promise<Kysely<WorkspaceDatabaseSchema>> {
|
||||
this.waitForInit();
|
||||
await this.waitForInit();
|
||||
|
||||
if (this.workspaceDatabases.has(userId)) {
|
||||
return this.workspaceDatabases.get(userId)!;
|
||||
|
||||
@@ -344,8 +344,6 @@ class SyncService {
|
||||
.where('nodes.id', 'is', null)
|
||||
.execute();
|
||||
|
||||
console.log('missingNodes', missingNodes);
|
||||
|
||||
if (missingNodes.length === 0) {
|
||||
return;
|
||||
}
|
||||
@@ -383,8 +381,6 @@ class SyncService {
|
||||
}
|
||||
);
|
||||
|
||||
console.log('missing node data', data);
|
||||
|
||||
await nodeService.replaceTransactions(
|
||||
userId,
|
||||
node.node_id,
|
||||
|
||||
Reference in New Issue
Block a user