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; }