Skip to content

Commit

Permalink
feat: 신청 클래스 일정 데이터 출력- RequestBody-> RequestParam으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
yubin-im committed Jul 3, 2024
1 parent 0241242 commit 4782181
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ public ResponseEntity<ApiResponse> myLessons(@AuthenticationPrincipal Long userI

// 신청 클래스 일정 데이터 출력
@GetMapping("/my/schedule")
public ResponseEntity<ApiResponse> mySchedules(@AuthenticationPrincipal Long userId, @RequestBody MyScheduleReqDto myScheduleReqDto) {
public ResponseEntity<ApiResponse> mySchedules(@AuthenticationPrincipal Long userId,
@RequestParam(name = "year") int year,
@RequestParam(name = "month") int month) {
MyScheduleReqDto myScheduleReqDto = MyScheduleReqDto.builder()
.year(year)
.month(month)
.build();

List<MyScheduleResDto> mySchedules = reservationService.mySchedules(userId, myScheduleReqDto);
return ResponseEntity.ok(new ApiResponse<>(true, "ok", mySchedules));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 4782181

Please sign in to comment.