From 069e4b320831f8c2e9059b838128adc1801b9c8c Mon Sep 17 00:00:00 2001 From: emost22 Date: Thu, 9 Mar 2023 12:11:15 +0900 Subject: [PATCH] [Nexters/www-be#77] Fix currentUserName if meetingUser is null, use UserEntity --- .../promise8/wwwbe/model/v1/dto/res/MeetingGetResDtoV1.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/promise8/wwwbe/model/v1/dto/res/MeetingGetResDtoV1.java b/src/main/java/com/promise8/wwwbe/model/v1/dto/res/MeetingGetResDtoV1.java index 878d8b9..dd1ced0 100644 --- a/src/main/java/com/promise8/wwwbe/model/v1/dto/res/MeetingGetResDtoV1.java +++ b/src/main/java/com/promise8/wwwbe/model/v1/dto/res/MeetingGetResDtoV1.java @@ -1,13 +1,13 @@ package com.promise8.wwwbe.model.v1.dto.res; import com.promise8.wwwbe.model.v1.dto.PromiseDayOfWeek; -import com.promise8.wwwbe.service.MeetingServiceHelper; -import com.promise8.wwwbe.service.ThumbnailHelper; import com.promise8.wwwbe.model.v1.dto.PromiseTime; import com.promise8.wwwbe.model.v1.entity.MeetingEntityV1; import com.promise8.wwwbe.model.v1.entity.MeetingStatusV1; import com.promise8.wwwbe.model.v1.entity.MeetingUserEntityV1; import com.promise8.wwwbe.model.v1.entity.UserEntityV1; +import com.promise8.wwwbe.service.MeetingServiceHelper; +import com.promise8.wwwbe.service.ThumbnailHelper; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Builder; @@ -101,7 +101,7 @@ public static MeetingGetResDtoV1 of( .meetingName(meetingEntity.getMeetingName()) .minimumAlertMembers(meetingEntity.getConditionCount()) .hostName(confirmedPromiseResDto.getHostName()) - .currentUserName(currentUserName) + .currentUserName(currentUserName == null ? userEntity.getUserName(): currentUserName) .isHost(userEntity.getUserId().equals(meetingEntity.getCreator().getUserId())) .joinedUserCount(isNoMeetingUser ? 0 : meetingEntity.getMeetingUserEntityList().size()) .votingUserCount(confirmedPromiseResDto.getVotingUserCount())