diff --git a/src/main/java/com/hanaro/hanafun/reservation/controller/ReservationController.java b/src/main/java/com/hanaro/hanafun/reservation/controller/ReservationController.java index 7b60c13..1d4040f 100644 --- a/src/main/java/com/hanaro/hanafun/reservation/controller/ReservationController.java +++ b/src/main/java/com/hanaro/hanafun/reservation/controller/ReservationController.java @@ -33,7 +33,14 @@ public ResponseEntity myLessons(@AuthenticationPrincipal Long userI // 신청 클래스 일정 데이터 출력 @GetMapping("/my/schedule") - public ResponseEntity mySchedules(@AuthenticationPrincipal Long userId, @RequestBody MyScheduleReqDto myScheduleReqDto) { + public ResponseEntity mySchedules(@AuthenticationPrincipal Long userId, + @RequestParam(name = "year") int year, + @RequestParam(name = "month") int month) { + MyScheduleReqDto myScheduleReqDto = MyScheduleReqDto.builder() + .year(year) + .month(month) + .build(); + List mySchedules = reservationService.mySchedules(userId, myScheduleReqDto); return ResponseEntity.ok(new ApiResponse<>(true, "ok", mySchedules)); } diff --git a/src/main/java/com/hanaro/hanafun/reservation/dto/request/MyScheduleReqDto.java b/src/main/java/com/hanaro/hanafun/reservation/dto/request/MyScheduleReqDto.java index 1cbf07a..72e2fe7 100644 --- a/src/main/java/com/hanaro/hanafun/reservation/dto/request/MyScheduleReqDto.java +++ b/src/main/java/com/hanaro/hanafun/reservation/dto/request/MyScheduleReqDto.java @@ -1,8 +1,10 @@ package com.hanaro.hanafun.reservation.dto.request; +import lombok.Builder; import lombok.Getter; @Getter +@Builder public class MyScheduleReqDto { private int year; private int month;