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); }