diff --git a/apps/server/src/modules/common-cartridge/common-cartridge-client/room-client/room-client.adapter.spec.ts b/apps/server/src/modules/common-cartridge/common-cartridge-client/room-client/room-client.adapter.spec.ts index 4357afb95fc..58c30d9ba7b 100644 --- a/apps/server/src/modules/common-cartridge/common-cartridge-client/room-client/room-client.adapter.spec.ts +++ b/apps/server/src/modules/common-cartridge/common-cartridge-client/room-client/room-client.adapter.spec.ts @@ -49,8 +49,8 @@ describe(CourseRoomsClientAdapter.name, () => { expect(service).toBeDefined(); }); - describe('getCourseRoomBoard', () => { - describe('when getCourseRoomBoard is called', () => { + describe('getRoomBoardByCourseId', () => { + describe('when getRoomBoardByCourseId is called', () => { const setup = () => { const roomId = faker.string.uuid(); const response = createMock>({ @@ -67,9 +67,9 @@ describe(CourseRoomsClientAdapter.name, () => { return { roomId, response }; }; - it('should return the structure of the course', async () => { + it('should return a room board with full contents', async () => { const { roomId, response } = setup(); - const result = await service.getRoomsByCourseId(roomId); + const result = await service.getRoomBoardByCourseId(roomId); expect(result).toEqual(response.data); }); @@ -91,7 +91,7 @@ describe(CourseRoomsClientAdapter.name, () => { it('should throw an UnauthorizedException', async () => { const { roomId, error, adapter } = setup(); - await expect(adapter.getRoomsByCourseId(roomId)).rejects.toThrowError(error); + await expect(adapter.getRoomBoardByCourseId(roomId)).rejects.toThrowError(error); }); }); }); diff --git a/apps/server/src/modules/common-cartridge/common-cartridge-client/room-client/room-client.adapter.ts b/apps/server/src/modules/common-cartridge/common-cartridge-client/room-client/room-client.adapter.ts index 0e081cfb106..2eec089afdc 100644 --- a/apps/server/src/modules/common-cartridge/common-cartridge-client/room-client/room-client.adapter.ts +++ b/apps/server/src/modules/common-cartridge/common-cartridge-client/room-client/room-client.adapter.ts @@ -9,7 +9,7 @@ import { CourseRoomsApi, SingleColumnBoardResponse } from './room-api-client'; export class CourseRoomsClientAdapter { constructor(private readonly courseRoomsApi: CourseRoomsApi, @Inject(REQUEST) private request: Request) {} - public async getRoomsByCourseId(roomId: string): Promise { + public async getRoomBoardByCourseId(roomId: string): Promise { const options = this.createOptionParams(); const response = await this.courseRoomsApi.courseRoomsControllerGetRoomBoard(roomId, options); diff --git a/apps/server/src/modules/common-cartridge/controller/common-cartridge.controller.ts b/apps/server/src/modules/common-cartridge/controller/common-cartridge.controller.ts index 359fd7be385..5fa5981b33d 100644 --- a/apps/server/src/modules/common-cartridge/controller/common-cartridge.controller.ts +++ b/apps/server/src/modules/common-cartridge/controller/common-cartridge.controller.ts @@ -16,7 +16,7 @@ export class CommonCartridgeController { } @Get('export/:parentId/room') - public async exportCourseRooms(@Param() exportCourseParams: ExportCourseParams): Promise { - return this.commonCartridgeUC.exportCourseRooms(exportCourseParams.parentId); + public async exportRoomBoard(@Param() exportCourseParams: ExportCourseParams): Promise { + return this.commonCartridgeUC.exportRoomBoard(exportCourseParams.parentId); } } diff --git a/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.ts b/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.ts index 3dc40a2a935..41bcf42c522 100644 --- a/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.ts +++ b/apps/server/src/modules/common-cartridge/service/common-cartridge-export.service.ts @@ -26,8 +26,8 @@ export class CommonCartridgeExportService { return courseCommonCartridgeMetadata; } - public async findCourseRooms(courseId: string): Promise { - const courseRooms = await this.courseRoomsClientAdapter.getRoomsByCourseId(courseId); + public async findRoomBoardByCourseId(courseId: string): Promise { + const courseRooms = await this.courseRoomsClientAdapter.getRoomBoardByCourseId(courseId); return courseRooms; } diff --git a/apps/server/src/modules/common-cartridge/uc/common-cartridge.uc.ts b/apps/server/src/modules/common-cartridge/uc/common-cartridge.uc.ts index 6e4dd455db6..c5374667198 100644 --- a/apps/server/src/modules/common-cartridge/uc/common-cartridge.uc.ts +++ b/apps/server/src/modules/common-cartridge/uc/common-cartridge.uc.ts @@ -24,8 +24,8 @@ export class CommonCartridgeUc { return response; } - public async exportCourseRooms(courseId: EntityId): Promise { - const response = await this.exportService.findCourseRooms(courseId); + public async exportRoomBoard(courseId: EntityId): Promise { + const response = await this.exportService.findRoomBoardByCourseId(courseId); return response; }