From 4782181f66e12dad77529c592511deb491e91894 Mon Sep 17 00:00:00 2001 From: yubin-im Date: Wed, 3 Jul 2024 13:27:36 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=8B=A0=EC=B2=AD=20=ED=81=B4=EB=9E=98?= =?UTF-8?q?=EC=8A=A4=20=EC=9D=BC=EC=A0=95=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20?= =?UTF-8?q?=EC=B6=9C=EB=A0=A5-=20RequestBody->=20RequestParam=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reservation/controller/ReservationController.java | 9 ++++++++- .../reservation/dto/request/MyScheduleReqDto.java | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) 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;