From bb2bd3749a58008cff9b1ed897c9ce2c8b2290c3 Mon Sep 17 00:00:00 2001 From: bw1611 <97327583+leebuwon@users.noreply.github.com> Date: Sun, 18 Feb 2024 21:33:06 +0900 Subject: [PATCH] =?UTF-8?q?Bug:=20PathVariable=20name=20=EB=AA=85=EC=8B=9C?= =?UTF-8?q?=20(#161)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chatroom/controller/ChatRoomController.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/chatroom-service/src/main/java/com/tadak/chatroomservice/domain/chatroom/controller/ChatRoomController.java b/backend/chatroom-service/src/main/java/com/tadak/chatroomservice/domain/chatroom/controller/ChatRoomController.java index 4013d1a..6fe8c7f 100644 --- a/backend/chatroom-service/src/main/java/com/tadak/chatroomservice/domain/chatroom/controller/ChatRoomController.java +++ b/backend/chatroom-service/src/main/java/com/tadak/chatroomservice/domain/chatroom/controller/ChatRoomController.java @@ -34,7 +34,7 @@ public ResponseEntity create(@RequestBody CreateChatroom * 방 입장 */ @PostMapping("/room-in/{roomId}") - public ResponseEntity enter(@PathVariable Long roomId, @RequestBody ChatRoomRequest chatRoomRequest){ + public ResponseEntity enter(@PathVariable("roomId") Long roomId, @RequestBody ChatRoomRequest chatRoomRequest){ EnterChatMemberResponse enter = chatRoomService.enter(roomId, chatRoomRequest); return ResponseEntity.status(HttpStatus.OK).body(enter); } @@ -43,7 +43,7 @@ public ResponseEntity enter(@PathVariable Long roomId, * 방 삭제 */ @DeleteMapping("/delete/{roomId}") - public ResponseEntity deleteChatRoom(@PathVariable Long roomId, @RequestBody ChatRoomRequest chatRoomRequest) { + public ResponseEntity deleteChatRoom(@PathVariable("roomId") Long roomId, @RequestBody ChatRoomRequest chatRoomRequest) { chatRoomService.deleteChatRoom(roomId, chatRoomRequest.getUsername()); return ResponseEntity.status(HttpStatus.OK).build(); } @@ -62,7 +62,7 @@ public ResponseEntity> getAllChatRoom() { * 강퇴 */ @PostMapping("/rooms/{roomId}/kicked/{username}") - public ResponseEntity kickedMember(@PathVariable Long roomId, @PathVariable String username, + public ResponseEntity kickedMember(@PathVariable("roomId") Long roomId, @PathVariable("username") String username, @RequestBody ChatRoomRequest chatRoomRequest){ KickMemberResponse kickMemberResponse = chatRoomService.kickMember(roomId, username, chatRoomRequest.getUsername()); return ResponseEntity.status(HttpStatus.OK).body(kickMemberResponse); @@ -72,7 +72,7 @@ public ResponseEntity kickedMember(@PathVariable Long roomId * 방장 위임 */ @PatchMapping("/rooms/{roomId}/change-owner/{username}") - public ResponseEntity changeOwner(@PathVariable Long roomId, @PathVariable String username, + public ResponseEntity changeOwner(@PathVariable("roomId") Long roomId, @PathVariable("username") String username, @RequestBody ChatRoomRequest chatRoomRequest){ ChangeOwnerResponse changeOwnerResponse = chatRoomService.changeOwner(roomId, username, chatRoomRequest.getUsername()); return ResponseEntity.status(HttpStatus.OK).body(changeOwnerResponse); @@ -82,7 +82,7 @@ public ResponseEntity changeOwner(@PathVariable Long roomId * 개별 방 조회 (채팅방 제목) */ @GetMapping("/rooms/{roomId}/roomName") - public ResponseEntity getChatRoomName(@PathVariable Long roomId){ + public ResponseEntity getChatRoomName(@PathVariable("roomId") Long roomId){ ChatRoomNameResponse getChatRoom = chatRoomService.findChatRoom(roomId); return ResponseEntity.status(HttpStatus.OK).body(getChatRoom); } @@ -91,7 +91,7 @@ public ResponseEntity getChatRoomName(@PathVariable Long r * 개별 방 조회 (참여자 수, 방장, 참여 멤버) */ @GetMapping("/rooms/{roomId}/roomInformation") - public ResponseEntity getChatRoomInfo(@PathVariable Long roomId){ + public ResponseEntity getChatRoomInfo(@PathVariable("roomId") Long roomId){ ChatRoomInfoResponse getChatRoomInfo = chatRoomService.findChatRoomInfo(roomId); return ResponseEntity.status(HttpStatus.OK).body(getChatRoomInfo); }