mirror of
https://github.com/docmost/docmost.git
synced 2026-05-21 09:14:07 +08:00
feat(base): emit base:rows:deleted websocket event
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
|||||||
BasePropertyUpdatedEvent,
|
BasePropertyUpdatedEvent,
|
||||||
BaseRowCreatedEvent,
|
BaseRowCreatedEvent,
|
||||||
BaseRowDeletedEvent,
|
BaseRowDeletedEvent,
|
||||||
|
BaseRowsDeletedEvent,
|
||||||
BaseRowReorderedEvent,
|
BaseRowReorderedEvent,
|
||||||
BaseRowUpdatedEvent,
|
BaseRowUpdatedEvent,
|
||||||
BaseSchemaBumpedEvent,
|
BaseSchemaBumpedEvent,
|
||||||
@@ -63,6 +64,17 @@ export class BaseWsConsumers {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OnEvent(EventName.BASE_ROWS_DELETED)
|
||||||
|
onRowsDeleted(e: BaseRowsDeletedEvent) {
|
||||||
|
this.ws.emitToBase(e.baseId, {
|
||||||
|
operation: 'base:rows:deleted',
|
||||||
|
baseId: e.baseId,
|
||||||
|
rowIds: e.rowIds,
|
||||||
|
actorId: e.actorId ?? null,
|
||||||
|
requestId: e.requestId ?? null,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@OnEvent(EventName.BASE_ROW_REORDERED)
|
@OnEvent(EventName.BASE_ROW_REORDERED)
|
||||||
onRowReordered(e: BaseRowReorderedEvent) {
|
onRowReordered(e: BaseRowReorderedEvent) {
|
||||||
this.ws.emitToBase(e.baseId, {
|
this.ws.emitToBase(e.baseId, {
|
||||||
|
|||||||
Reference in New Issue
Block a user