Skip to content

Commit e76cc51

Browse files
committed
feat(be) : Drefactor¨ 사용하지 않는 코드 제거
1 parent 6b4a402 commit e76cc51

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main/kotlin/com/back/koreaTravelGuide/domain/userChat/chatmessage/controller/ChatMessageController.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.back.koreaTravelGuide.domain.userChat.chatmessage.controller
33
import com.back.koreaTravelGuide.common.ApiResponse
44
import com.back.koreaTravelGuide.domain.userChat.chatmessage.service.ChatMessageService
55
import org.springframework.http.ResponseEntity
6+
import org.springframework.messaging.simp.SimpMessagingTemplate
67
import org.springframework.web.bind.annotation.GetMapping
78
import org.springframework.web.bind.annotation.PathVariable
89
import org.springframework.web.bind.annotation.PostMapping
@@ -15,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController
1516
@RequestMapping("/api/userchat/rooms")
1617
class ChatMessageController(
1718
private val msgSvc: ChatMessageService,
18-
// private val messagingTemplate: SimpMessagingTemplate,
19+
private val messagingTemplate: SimpMessagingTemplate,
1920
) {
2021
@GetMapping("/{roomId}/messages")
2122
fun listMessages(
@@ -38,10 +39,10 @@ class ChatMessageController(
3839
@RequestBody req: ChatMessageService.SendMessageReq,
3940
): ResponseEntity<ApiResponse<Any>> {
4041
val saved = msgSvc.send(roomId, req)
41-
// messagingTemplate.convertAndSend(
42-
// "/topic/userchat/$roomId",
43-
// ApiResponse(msg = "메시지 전송", data = saved),
44-
// )
42+
messagingTemplate.convertAndSend(
43+
"/topic/userchat/$roomId",
44+
ApiResponse(msg = "메시지 전송", data = saved),
45+
)
4546
return ResponseEntity.status(201).body(ApiResponse(msg = "메시지 전송", data = saved))
4647
}
4748
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ class ChatRoomService(
1212
private val roomRepository: ChatRoomRepository,
1313
private val messageRepository: ChatMessageRepository,
1414
) {
15-
data class CreateRoomRequest(val title: String, val guideId: Long, val userId: Long)
1615

1716
@Transactional
1817
fun exceptOneToOneRoom(

0 commit comments

Comments
 (0)