Skip to content

Commit aecb87b

Browse files
fix: getUserWorkspaces 칼럼 추가
1 parent af077f5 commit aecb87b

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

apps/backend/src/workspace/dtos/getUserWorkspacesResponse.dto.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@ export class GetUserWorkspacesResponseDto {
1717
title: 'naver-boostcamp-9th',
1818
description: '네이버 부스트캠프 9기 워크스페이스입니다',
1919
thumbnailUrl: 'https://example.com/image1.png',
20-
role: 'owner',
20+
role: 'guest',
21+
visibility: 'private',
2122
},
2223
{
2324
workspaceId: 'snowflake-id-2',
2425
title: '2024-fall-컴퓨터구조',
2526
description: null,
2627
thumbnailUrl: null,
27-
role: 'guest',
28+
role: 'owner',
29+
visibility: 'public',
2830
},
2931
],
3032
description: '사용자가 속한 모든 워크스페이스 배열',

apps/backend/src/workspace/dtos/userWorkspace.dto.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ export class UserWorkspaceDto {
44
description: string | null;
55
thumbnailUrl: string | null;
66
role: 'owner' | 'guest';
7+
visibility: 'public' | 'private';
78
}

apps/backend/src/workspace/workspace.service.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ describe('WorkspaceService', () => {
251251
description: 'Workspace Description',
252252
thumbnailUrl: 'http://example.com/thumbnail.png',
253253
role: 'owner',
254+
visibility: 'private',
254255
},
255256
]);
256257
expect(roleRepository.find).toHaveBeenCalledWith({

apps/backend/src/workspace/workspace.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export class WorkspaceService {
108108
description: role.workspace.description || null,
109109
thumbnailUrl: role.workspace.thumbnailUrl || null,
110110
role: role.role as 'owner' | 'guest',
111+
visibility: role.workspace.visibility as 'public' | 'private',
111112
}));
112113
}
113114

0 commit comments

Comments
 (0)