diff --git a/@noctaCrdt/Interfaces.ts b/@noctaCrdt/Interfaces.ts index b265c3f0..56c55f5e 100644 --- a/@noctaCrdt/Interfaces.ts +++ b/@noctaCrdt/Interfaces.ts @@ -80,6 +80,7 @@ export interface RemotePageDeleteOperation { type: "pageDelete"; clientId: number; workspaceId: string; + pageTitle: string; pageId: string; } diff --git a/server/src/crdt/crdt.gateway.ts b/server/src/crdt/crdt.gateway.ts index e1488724..7fc774cd 100644 --- a/server/src/crdt/crdt.gateway.ts +++ b/server/src/crdt/crdt.gateway.ts @@ -280,13 +280,14 @@ export class CrdtGateway implements OnGatewayInit, OnGatewayConnection, OnGatewa if (pageIndex === -1) { throw new Error(`Page with id ${data.pageId} not found`); } - // pageList에서 페이지 제거 + const pageTitle = (await this.workSpaceService.getPage(userId, data.pageId)).title; currentWorkspace.pageList.splice(pageIndex, 1); const operation = { type: "pageDelete", workspaceId: data.workspaceId, pageId: data.pageId, + pageTitle, clientId: data.clientId, } as RemotePageDeleteOperation; client.emit("delete/page", operation);