Skip to content

Commit

Permalink
Bug: PathVariable name 명시 (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
leebuwon authored Feb 18, 2024
1 parent 5e47b13 commit bb2bd37
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public ResponseEntity<CreateChatroomResponse> create(@RequestBody CreateChatroom
* 방 입장
*/
@PostMapping("/room-in/{roomId}")
public ResponseEntity<EnterChatMemberResponse> enter(@PathVariable Long roomId, @RequestBody ChatRoomRequest chatRoomRequest){
public ResponseEntity<EnterChatMemberResponse> enter(@PathVariable("roomId") Long roomId, @RequestBody ChatRoomRequest chatRoomRequest){
EnterChatMemberResponse enter = chatRoomService.enter(roomId, chatRoomRequest);
return ResponseEntity.status(HttpStatus.OK).body(enter);
}
Expand All @@ -43,7 +43,7 @@ public ResponseEntity<EnterChatMemberResponse> enter(@PathVariable Long roomId,
* 방 삭제
*/
@DeleteMapping("/delete/{roomId}")
public ResponseEntity<Void> deleteChatRoom(@PathVariable Long roomId, @RequestBody ChatRoomRequest chatRoomRequest) {
public ResponseEntity<Void> deleteChatRoom(@PathVariable("roomId") Long roomId, @RequestBody ChatRoomRequest chatRoomRequest) {
chatRoomService.deleteChatRoom(roomId, chatRoomRequest.getUsername());
return ResponseEntity.status(HttpStatus.OK).build();
}
Expand All @@ -62,7 +62,7 @@ public ResponseEntity<List<ChatRoomResponse>> getAllChatRoom() {
* 강퇴
*/
@PostMapping("/rooms/{roomId}/kicked/{username}")
public ResponseEntity<KickMemberResponse> kickedMember(@PathVariable Long roomId, @PathVariable String username,
public ResponseEntity<KickMemberResponse> 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);
Expand All @@ -72,7 +72,7 @@ public ResponseEntity<KickMemberResponse> kickedMember(@PathVariable Long roomId
* 방장 위임
*/
@PatchMapping("/rooms/{roomId}/change-owner/{username}")
public ResponseEntity<ChangeOwnerResponse> changeOwner(@PathVariable Long roomId, @PathVariable String username,
public ResponseEntity<ChangeOwnerResponse> 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);
Expand All @@ -82,7 +82,7 @@ public ResponseEntity<ChangeOwnerResponse> changeOwner(@PathVariable Long roomId
* 개별 방 조회 (채팅방 제목)
*/
@GetMapping("/rooms/{roomId}/roomName")
public ResponseEntity<ChatRoomNameResponse> getChatRoomName(@PathVariable Long roomId){
public ResponseEntity<ChatRoomNameResponse> getChatRoomName(@PathVariable("roomId") Long roomId){
ChatRoomNameResponse getChatRoom = chatRoomService.findChatRoom(roomId);
return ResponseEntity.status(HttpStatus.OK).body(getChatRoom);
}
Expand All @@ -91,7 +91,7 @@ public ResponseEntity<ChatRoomNameResponse> getChatRoomName(@PathVariable Long r
* 개별 방 조회 (참여자 수, 방장, 참여 멤버)
*/
@GetMapping("/rooms/{roomId}/roomInformation")
public ResponseEntity<ChatRoomInfoResponse> getChatRoomInfo(@PathVariable Long roomId){
public ResponseEntity<ChatRoomInfoResponse> getChatRoomInfo(@PathVariable("roomId") Long roomId){
ChatRoomInfoResponse getChatRoomInfo = chatRoomService.findChatRoomInfo(roomId);
return ResponseEntity.status(HttpStatus.OK).body(getChatRoomInfo);
}
Expand Down

0 comments on commit bb2bd37

Please sign in to comment.