Skip to content

Commit

Permalink
Merge pull request #208 from fourix4/refactor/manager
Browse files Browse the repository at this point in the history
[#148] test : request mapping test
  • Loading branch information
TaeHoon0 authored Jul 28, 2024
2 parents 312dae4 + 2fc795e commit 3c9a898
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<UsageFeeRequestDto> usageFee,
@RequestParam("title_image") MultipartFile titleImage,
@RequestParam("multiple_images") List<MultipartFile> 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();
}
Expand Down

0 comments on commit 3c9a898

Please sign in to comment.