Skip to content

Commit

Permalink
[style] : 코드 리포멧팅
Browse files Browse the repository at this point in the history
  • Loading branch information
hyun2371 committed Sep 27, 2024
1 parent 7cdef65 commit aa58794
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public ChatRoomDetailResponse createChatRoom(CreateChatRoomRequest request, Memb
}

@Transactional(readOnly = true)
public ChatRoomDetailResponse getChatRoomById(Long chatRoomId, Member member){
public ChatRoomDetailResponse getChatRoomById(Long chatRoomId, Member member) {
ChatRoom chatRoom = getChatRoomById(chatRoomId);
Member chatPartner = getChatPartner(member.getId(), chatRoom);
return ChatRoomMapper.toChatRoomDetailResponse(chatRoom, chatPartner);
Expand Down Expand Up @@ -106,11 +106,10 @@ private Member getMemberById(Long id) {
.orElseThrow(() -> new NotFoundException(MemberErrorCode.NOT_FOUND_MEMBER));
}

private Member getChatPartner(Long memberId, ChatRoom chatRoom){
if (Objects.equals(chatRoom.getAnswerer().getId(), memberId)){
private Member getChatPartner(Long memberId, ChatRoom chatRoom) {
if (Objects.equals(chatRoom.getAnswerer().getId(), memberId)) {
return chatRoom.getInquirer();
}
else if (Objects.equals(chatRoom.getInquirer().getId(), memberId)){
} else if (Objects.equals(chatRoom.getInquirer().getId(), memberId)) {
return chatRoom.getAnswerer();
} else {
throw new ValidationException(ChatErrorCode.UNAUTHORIZED_CHAT_ROOM);
Expand Down

0 comments on commit aa58794

Please sign in to comment.