feat(server): auto create page owner role (#9944)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user