feat(server): auto create page owner role (#9944)

This commit is contained in:
forehalo
2025-02-05 10:09:57 +00:00
parent 5913715e33
commit 0ff8d3af6f
2 changed files with 23 additions and 0 deletions

View File

@@ -32,6 +32,11 @@ declare global {
workspaceId: string;
docId: string;
};
'doc.update.pushed': {
workspaceId: string;
docId: string;
editor?: string;
};
}
}
@Injectable()
@@ -105,6 +110,11 @@ export class PgWorkspaceDocStorageAdapter extends DocStorageAdapter {
await this.updateCachedUpdatesCount(workspaceId, docId, batch.length);
}
});
this.event.emit('doc.update.pushed', {
workspaceId,
docId,
editor: editorId,
});
} catch (e) {
this.logger.error('Failed to insert doc updates', e);
metrics.doc.counter('doc_update_insert_failed').add(1);