Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package Spring.MindStone.web.controller;

import Spring.MindStone.apiPayload.ApiResponse;
import Spring.MindStone.service.habitService.HabitCalendarService;
import Spring.MindStone.web.dto.habitCalendarDto.HabitCalendarResponseDto;
import Spring.MindStone.config.jwt.JwtTokenUtil;
Expand All @@ -20,12 +21,12 @@ public class HabitCalendarController {

@Operation(summary = "습관 달력 조회 API", description = "사용자의 특정 년/월 습관 기록 데이터를 조회합니다.")
@GetMapping
public ResponseEntity<HabitCalendarResponseDto> getCalendarData(
public ApiResponse<HabitCalendarResponseDto> getCalendarData(
@RequestHeader("Authorization") String authorization,
@RequestParam int year,
@RequestParam int month) {

Long memberId = JwtTokenUtil.extractMemberId(authorization);
return ResponseEntity.ok(habitCalendarService.getCalendarData(memberId, year, month));
return ApiResponse.onSuccess(habitCalendarService.getCalendarData(memberId, year, month));
}
}