From 5aee34efb5ab464b1bd174f0816b21f70ad943c2 Mon Sep 17 00:00:00 2001 From: sua kang Date: Mon, 19 Feb 2024 20:29:15 +0900 Subject: [PATCH] refactor: add missing field userCount --- .../java/chattingserver/dto/response/JoinedRoomResponseDto.java | 1 + .../src/main/java/chattingserver/service/RoomService.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/backend/chatting-server/src/main/java/chattingserver/dto/response/JoinedRoomResponseDto.java b/src/backend/chatting-server/src/main/java/chattingserver/dto/response/JoinedRoomResponseDto.java index 38a9b40d..96ffe2c6 100644 --- a/src/backend/chatting-server/src/main/java/chattingserver/dto/response/JoinedRoomResponseDto.java +++ b/src/backend/chatting-server/src/main/java/chattingserver/dto/response/JoinedRoomResponseDto.java @@ -13,6 +13,7 @@ public class JoinedRoomResponseDto { private String roomId; private String roomName; + private long userCount; private String thumbnailImage; private List users; private UserListResponseDto playlistOwner; diff --git a/src/backend/chatting-server/src/main/java/chattingserver/service/RoomService.java b/src/backend/chatting-server/src/main/java/chattingserver/service/RoomService.java index 8c19864b..4f01e218 100644 --- a/src/backend/chatting-server/src/main/java/chattingserver/service/RoomService.java +++ b/src/backend/chatting-server/src/main/java/chattingserver/service/RoomService.java @@ -62,6 +62,7 @@ public List findJoinedRoomsByUid(Long uid) { .roomName(room.getRoomName()) .thumbnailImage(room.getThumbnailImage()) .users(room.getUsers()) + .userCount(room.getUsers().size()) .playlistOwner(entityToResponseDtoConverter.convertUser(room.getPlaylistOwner())) .lastMessage(lastMessage) .build());