Skip to content

Commit

Permalink
fix: 미션기록 TabResponse recordId 제거 (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbscks97 authored Aug 24, 2024
1 parent fd1cb65 commit 8bf7932
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public MissionTabResponse getMissionTabStatus(Long missionId) {
.orElse(null);

if (missionRecord == null) {
return MissionTabResponse.of(null, null, MissionRecordStatus.NOT_COMPLETED);
return MissionTabResponse.of(null, MissionRecordStatus.NOT_COMPLETED);
}

MissionRecordStatus missionRecordStatus = missionRecord.getStatus();
Expand All @@ -206,7 +206,7 @@ public MissionTabResponse getMissionTabStatus(Long missionId) {
? missionRecord.getImageUrl()
: null;

return MissionTabResponse.of(missionRecord.getId(), imageUrl, missionRecordStatus);
return MissionTabResponse.of(imageUrl, missionRecordStatus);
}

@Transactional(propagation = Propagation.REQUIRES_NEW)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
import io.swagger.v3.oas.annotations.media.Schema;

public record MissionTabResponse(
@Schema(description = "미션기록 ID", example = "1") Long recordId,
@Schema(description = "이미지 URL", example = "example.jpeg") String imageUrl,
@Schema(description = "미션 상태", example = "NOT_COMPLETED") MissionRecordStatus status) {

public static MissionTabResponse of(
Long recordId, String imageUrl, MissionRecordStatus status) {
return new MissionTabResponse(recordId, imageUrl, status);
public static MissionTabResponse of(String imageUrl, MissionRecordStatus status) {
return new MissionTabResponse(imageUrl, status);
}
}

0 comments on commit 8bf7932

Please sign in to comment.