From 2fc795eb1c4b5bfafb803a6fd5bcb9daa8244b90 Mon Sep 17 00:00:00 2001 From: TaeHoon0 Date: Sun, 28 Jul 2024 15:51:00 +0900 Subject: [PATCH] [#148] test : request mapping test --- .../controller/ManagerController.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/CatchStudy/controller/ManagerController.java b/src/main/java/com/example/CatchStudy/controller/ManagerController.java index 03d79cf..58b9716 100644 --- a/src/main/java/com/example/CatchStudy/controller/ManagerController.java +++ b/src/main/java/com/example/CatchStudy/controller/ManagerController.java @@ -41,13 +41,26 @@ public Response saveStudyCafe(@RequestParam String cafeName, @RequestParam Addre } @PatchMapping("/manager") - public Response updateStudyCafe(@ModelAttribute ManagerRequestDto managerRequestDto) { + public Response updateStudyCafe(@RequestParam("cafe_name") String cafeName, + @RequestPart("address") AddressRequestDto address, + @RequestParam("opening_hours") String openingHours, + @RequestParam("closed_hours") String closedHours, + @RequestParam("closed_day") String closedDay, + @RequestParam("cafe_phone") String cafePhone, + @RequestParam("seats") Integer seats, + @RequestPart("room_info") RoomInfoRequestDto roomInfo, + @RequestPart("usage_fee") List usageFee, + @RequestParam("title_image") MultipartFile titleImage, + @RequestParam("multiple_images") List multipleImages, + @RequestParam("seat_chart_image") MultipartFile seatChartImage) { + ManagerRequestDto managerRequestDto = new ManagerRequestDto( + cafeName, address, openingHours, closedHours, closedDay, cafePhone, seats, roomInfo, usageFee, titleImage, multipleImages, seatChartImage); System.out.println(managerRequestDto.getCafePhone()); System.out.println(managerRequestDto.getCafeName()); System.out.println(managerRequestDto.getAddress().getCity()); System.out.println(managerRequestDto.getRoomInfo().getCancelAvailableTime()); - ; + managerService.updateStudyCafe(managerRequestDto); return Response.success(); }