Skip to content

Commit

Permalink
Feat : 컨트롤러 걔층
Browse files Browse the repository at this point in the history
반환하는 DTO 변경으로인한 수정 소요
  • Loading branch information
Mouon committed Feb 13, 2024
1 parent 43c5a96 commit 1c24b32
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.kuit.chatdiary.controller.calendar;

import com.kuit.chatdiary.domain.Sender;
import com.kuit.chatdiary.dto.CalendarInquiryResponse;
import com.kuit.chatdiary.dto.DateInquiryResponse;
import com.kuit.chatdiary.dto.CalendarInquiryResponseDTO;
import com.kuit.chatdiary.service.calendar.CalendarInquiryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.format.annotation.DateTimeFormat;
Expand All @@ -12,11 +10,8 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.YearMonth;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("chat")
Expand All @@ -27,11 +22,11 @@ public CalendarInquiryController(CalendarInquiryService calendarInquiryService)
this.calendarInquiryService = calendarInquiryService;
}
@GetMapping("/chat")
public ResponseEntity<List<DateInquiryResponse>> getChatExistsByMonth(
public ResponseEntity<List<CalendarInquiryResponseDTO>> getChatExistsByMonth(
@RequestParam("memberId") long memberId,
@RequestParam("month") @DateTimeFormat(pattern = "yyyy-MM") YearMonth month) {

List<DateInquiryResponse> chatExistsByMonth = calendarInquiryService.existsChatByMonth(memberId, month);
List<CalendarInquiryResponseDTO> chatExistsByMonth = calendarInquiryService.getCalendarInquiryResponses(memberId,month);
return ResponseEntity.ok(chatExistsByMonth);
}
}

0 comments on commit 1c24b32

Please sign in to comment.