fix(chat): 채팅방 메시지 전송 API
- 빈 메시지이면 전송하지 않고 반환
This commit is contained in:
@@ -133,6 +133,10 @@ class ChatRoomController(
|
|||||||
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
|
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
|
||||||
if (member.auth == null) throw SodaException("본인인증을 하셔야 합니다.")
|
if (member.auth == null) throw SodaException("본인인증을 하셔야 합니다.")
|
||||||
|
|
||||||
|
if (request.message.isBlank()) {
|
||||||
|
ApiResponse.error()
|
||||||
|
} else {
|
||||||
ApiResponse.ok(chatRoomService.sendMessage(member, chatRoomId, request.message))
|
ApiResponse.ok(chatRoomService.sendMessage(member, chatRoomId, request.message))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user