diff --git a/nestjs-BE/server/src/board-trees/board-trees.gateway.ts b/nestjs-BE/server/src/board-trees/board-trees.gateway.ts index 338fbfc7..56de6ca2 100644 --- a/nestjs-BE/server/src/board-trees/board-trees.gateway.ts +++ b/nestjs-BE/server/src/board-trees/board-trees.gateway.ts @@ -37,7 +37,6 @@ export class BoardTreesGateway { const payloadObject = JSON.parse(payload); const { boardId, operation: serializedOperation } = payloadObject; - const operationObject = JSON.parse(serializedOperation); const operationTypeMap = { add: OperationAdd.parse, delete: OperationDelete.parse, @@ -46,7 +45,7 @@ export class BoardTreesGateway { }; const operation = - operationTypeMap[operationObject.operationType](operationObject); + operationTypeMap[serializedOperation.operationType](serializedOperation); this.boardTreesService.applyOperation(boardId, operation); client.broadcast