Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add JoinedRoomResponseDto missing field - playlist #99

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package chattingserver.dto.response;

import chattingserver.domain.chat.LastMessage;
import chattingserver.domain.room.Playlist;
import chattingserver.domain.room.User;
import lombok.*;
import java.util.List;
Expand All @@ -11,11 +12,12 @@
@AllArgsConstructor
@ToString
public class JoinedRoomResponseDto {
private String roomId;
private String id;
private String roomName;
private long userCount;
private String thumbnailImage;
private List<User> users;
private UserListResponseDto playlistOwner;
private Playlist playlist;
private String thumbnailImage;
private LastMessage lastMessage;
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ public List<JoinedRoomResponseDto> findJoinedRoomsByUid(Long uid) {
.build();

myRoomsDto.add(JoinedRoomResponseDto.builder()
.roomId(roomId)
.id(roomId)
.roomName(room.getRoomName())
.thumbnailImage(room.getThumbnailImage())
.users(room.getUsers())
.userCount(room.getUsers().size())
.users(room.getUsers())
.playlistOwner(entityToResponseDtoConverter.convertUser(room.getPlaylistOwner()))
.playlist(room.getPlaylist())
.thumbnailImage(room.getThumbnailImage())
.lastMessage(lastMessage)
.build());
}
Expand Down
Loading