Skip to content

Commit 15b2122

Browse files
committed
refactor(be): Rename method
1 parent 3b8cb64 commit 15b2122

File tree

1 file changed

+4
-4
lines changed
  • src/main/kotlin/com/back/koreaTravelGuide/domain/userChat/chatroom/service

1 file changed

+4
-4
lines changed

src/main/kotlin/com/back/koreaTravelGuide/domain/userChat/chatroom/service/ChatRoomService.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ChatRoomService(
2020
userId: Long,
2121
requesterId: Long,
2222
): ChatRoom {
23-
ensureParticipant(guideId, userId, requesterId)
23+
checkParticipant(guideId, userId, requesterId)
2424
// 1) 기존 방 재사용
2525
roomRepository.findOneToOneRoom(guideId, userId)?.let { return it }
2626

@@ -39,7 +39,7 @@ class ChatRoomService(
3939
val room =
4040
roomRepository.findById(roomId)
4141
.orElseThrow { NoSuchElementException("room not found: $roomId") }
42-
ensureMember(room, requesterId)
42+
checkMember(room, requesterId)
4343
return room
4444
}
4545

@@ -56,7 +56,7 @@ class ChatRoomService(
5656
roomRepository.deleteById(roomId)
5757
}
5858

59-
private fun ensureParticipant(
59+
private fun checkParticipant(
6060
guideId: Long,
6161
userId: Long,
6262
requesterId: Long,
@@ -66,7 +66,7 @@ class ChatRoomService(
6666
}
6767
}
6868

69-
private fun ensureMember(
69+
private fun checkMember(
7070
room: ChatRoom,
7171
requesterId: Long,
7272
) {

0 commit comments

Comments
 (0)