Refactor/timetable#136
Merged
Merged
Conversation
- 새로 만든 api가 course 테이블의 정보 뿐만 아니라 course-review 테이블에 접근해서 특정 강의(학수번호, 교수명)에 달린 강의평의 개수까지 반환해줘야해서 공통모듈 만들었습니다
- 까먹을까봐 커밋으로 남겨둡니다...ㅎ
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the course search functionality to allow keyword‐based searches without requiring semester input while cleaning up redundant DTOs. Key changes include adding a new endpoint and associated DTOs for “all-time” course searches, removing several outdated search DTOs, and integrating review count logic via a new CommonCourseModule.
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/decorators/docs/course.decorator.ts | Added API documentation for the new searchAllTimeCourses endpoint. |
| src/course/dto/search-all-time-courses-request.dto.ts & response DTO | Introduced new request/response DTOs for all-time course search. |
| src/course/course.service.ts | Added searchAllTimeCourses method with integrated review count lookup. |
| src/course/course.controller.ts | Exposed the new GET /all-time endpoint. |
| Other DTO files | Removed outdated search DTOs. |
| src/common-course | Added new module and service for handling common course operations. |
| src/course-review | Minor adjustments and TODO comments regarding module dependencies. |
Comments suppressed due to low confidence (2)
src/course/course.service.ts:253
- [nitpick] Consider extracting the course code prefix extraction into a well-named variable or helper to avoid repeated string splitting.
courseCode: course.courseCode.split('-')[0],
src/course/dto/search-all-time-courses-response.dto.ts:25
- [nitpick] Replace the hard-coded index '19' with a named constant for clarity and to better indicate its relationship to the pagination limit.
const nextCursorId = hasNextPage ? courses[19].id : null;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
학기 상관없이 keyword만 입력해서 강의검색하는 엔드포인트를 만들었습니다.
🧪 Test
관련 정보들 제대로 잘 반환하는 지 테스트 해주시면 됩니다.