From 7c35e177191dd542b7f3f72ff6416c02c5fe1be6 Mon Sep 17 00:00:00 2001 From: kimtaeyoung <62414583+kimtaeyoung201910794@users.noreply.github.com> Date: Fri, 23 Aug 2024 00:48:20 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B1=84=ED=8C=85=20=EC=9D=91=EB=8B=B5=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/example/majorLink/controller/ChatController.java | 2 +- .../java/com/example/majorLink/dto/ChatmessageResponseDTO.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/majorLink/src/main/java/com/example/majorLink/controller/ChatController.java b/majorLink/src/main/java/com/example/majorLink/controller/ChatController.java index 35eca4b..36db278 100644 --- a/majorLink/src/main/java/com/example/majorLink/controller/ChatController.java +++ b/majorLink/src/main/java/com/example/majorLink/controller/ChatController.java @@ -90,7 +90,7 @@ public List getAllChatRoom() { public List getChatHistory(@PathVariable Long roomId) { return chatService.getChatMessageById(roomId).stream().map(chatMessage -> ChatmessageResponseDTO.builder() .id(chatMessage.getId()) - .senderUsername(chatMessage.getSender().getUsername()) + .name(chatMessage.getSender().getUsername()) .content(chatMessage.getContent()) .chatroomId(chatMessage.getChatRoom().getId()) .build()) diff --git a/majorLink/src/main/java/com/example/majorLink/dto/ChatmessageResponseDTO.java b/majorLink/src/main/java/com/example/majorLink/dto/ChatmessageResponseDTO.java index b04d0f9..2234852 100644 --- a/majorLink/src/main/java/com/example/majorLink/dto/ChatmessageResponseDTO.java +++ b/majorLink/src/main/java/com/example/majorLink/dto/ChatmessageResponseDTO.java @@ -14,7 +14,7 @@ public class ChatmessageResponseDTO { private Long id; private String content; - private String senderUsername; + private String name; private Long chatroomId; }