Skip to content

Commit 67c650c

Browse files
Merge pull request #370 from boostcampwm-2024/feature-be-#369
workspace id 파싱
2 parents fc24414 + 02602e3 commit 67c650c

File tree

2 files changed

+115
-116
lines changed

2 files changed

+115
-116
lines changed

apps/websocket/src/yjs/yjs.service.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,11 @@ export class YjsService
7171
this.initializePage(pageId, editorDoc);
7272
}
7373

74-
if (!customDoc.name?.startsWith('flow-room-')) {
75-
return;
74+
if (customDoc.name?.startsWith('flow-room-')) {
75+
const workspaceId = customDoc.name.split('-')[2] ?? 'main';
76+
// 만약 workspace document라면 node, edge 초기 데이터를 세팅해줍니다.
77+
this.initializeWorkspace(workspaceId, doc);
7678
}
77-
78-
// TODO: workspaceId 파싱 로직 추가하기
79-
const workspaceId = 'main';
80-
// 만약 workspace document라면 node, edge 초기 데이터를 세팅해줍니다.
81-
this.initializeWorkspace(workspaceId, doc);
8279
});
8380
}
8481

0 commit comments

Comments
 (0)