Skip to content

Commit

Permalink
refactor: 퇴장 메시지 로직 폐기
Browse files Browse the repository at this point in the history
  • Loading branch information
suakang17 committed Feb 16, 2024
1 parent 9f275ba commit 4ab3583
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,15 @@ public ResponseEntity<BaseResponse<RoomResponseDto>> groupCreation(@Valid @Reque
@Operation(summary = "채팅방 영구적으로 나가기", description = "그룹 채팅방에서 유저 삭제", responses = {
@ApiResponse(responseCode = "200", description = "삭제 성공", content = @Content(schema = @Schema(implementation = CommonAPIMessage.class)))})
@PostMapping("/exit/{roomId}")
public ResponseEntity<BaseResponse<HashMap<String, String>>> outOfTheRoom(@PathVariable(value = "roomId") String roomId, @RequestBody UserEntranceRequestDto userDto) {
producers.sendMessage(chatMessageService.permanentLeaving(roomId, userDto));
if (roomService.exitRoom(roomId, userDto.getUid())) {
public ResponseEntity<BaseResponse<HashMap<String, String>>> outOfTheRoom(@PathVariable(value = "roomId") String roomId, @RequestParam Long uid) {
if (roomService.exitRoom(roomId, uid)) {

HashMap<String, String> roomId1 = new HashMap<>();
roomId1.put("roomId", roomId);

return ResponseEntity.ok(BaseResponse.from(HttpStatus.OK, "채팅방 영구 퇴장 성공", roomId1));
}
log.error("exitRoom 채팅방 나가기 실패 roomId: {}, userId: {}", roomId, userDto.getUid());
log.error("exitRoom 채팅방 나가기 실패 roomId: {}, userId: {}", roomId, uid);
return null; // TODO common err 처리
}

Expand Down

0 comments on commit 4ab3583

Please sign in to comment.