Skip to content

Commit

Permalink
Merge pull request TeamMajorLink#111 from chaerinryu/refactor#102
Browse files Browse the repository at this point in the history
♻️ Feat: 엔드포인트 변경
  • Loading branch information
chaerinryu authored Aug 23, 2024
2 parents d06e5e9 + 52b57d4 commit 43b3e0c
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public LectureResponseDTO.LecturePreViewList getMostRecruitedLectures(@RequestPa
}

// 카테고리별 강의 조회 api
@GetMapping("/{categoryId}")
@GetMapping("/{categoryId}/category")
@ResponseBody
public LectureResponseDTO.LecturePreViewList getLecturesByCategory(@RequestParam(name = "page", defaultValue = "1") Integer page,
@PathVariable(name = "categoryId") Long categoryId){
Expand Down Expand Up @@ -311,7 +311,7 @@ public LectureResponseDTO.LecturePreViewList getLecturesByCategory(@RequestParam
.build();
}

// 강의 정보 list 조회 api
// 카테고리, 레벨 조회 api
@GetMapping("/categories")
@ResponseBody
public LectureResponseDTO.LectureInfoList getCategoryList() {
Expand All @@ -321,24 +321,24 @@ public LectureResponseDTO.LectureInfoList getCategoryList() {
.map(Level::name)
.collect(Collectors.toList());

List<String> days = Arrays.stream(Day.values())
/*List<String> days = Arrays.stream(Day.values())
.map(Day::name)
.collect(Collectors.toList());
List<String> exams = Arrays.stream(Exam.values())
.map(Exam::name)
.collect(Collectors.toList());
.collect(Collectors.toList());*/

return LectureResponseDTO.LectureInfoList.builder()
.categoryList(categories)
.levelList(levels)
.dayList(days)
.examList(exams)
/* .dayList(days)
.examList(exams)*/
.build();
}

// 레벨별 강의 조회 api
@GetMapping("/{level}")
@GetMapping("/{level}/level")
@ResponseBody
public LectureResponseDTO.LecturePreViewList getLecturesByLevel(@RequestParam(name = "page", defaultValue = "1") Integer page,
@PathVariable(name = "level") Level level){
Expand Down

0 comments on commit 43b3e0c

Please sign in to comment.