From 9a81bc8cae3918bf1bc3555d61c0d9a52ff9df1f Mon Sep 17 00:00:00 2001 From: yummygyudon Date: Sun, 26 Nov 2023 07:35:50 +0900 Subject: [PATCH] HOT FIX : Add Title property in DetailView DTO --- .../sopkerton/program/dto/response/ProgramDetailResponse.java | 2 ++ .../java/org/sopt/sopkerton/program/service/ProgramService.java | 1 + 2 files changed, 3 insertions(+) diff --git a/src/main/java/org/sopt/sopkerton/program/dto/response/ProgramDetailResponse.java b/src/main/java/org/sopt/sopkerton/program/dto/response/ProgramDetailResponse.java index 1a414c5..8d3b322 100644 --- a/src/main/java/org/sopt/sopkerton/program/dto/response/ProgramDetailResponse.java +++ b/src/main/java/org/sopt/sopkerton/program/dto/response/ProgramDetailResponse.java @@ -3,6 +3,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; public record ProgramDetailResponse ( + @JsonProperty("title") + String title, @JsonProperty("imageUrl") String imageUrl, @JsonProperty("content") diff --git a/src/main/java/org/sopt/sopkerton/program/service/ProgramService.java b/src/main/java/org/sopt/sopkerton/program/service/ProgramService.java index e0748cf..4e70a7b 100644 --- a/src/main/java/org/sopt/sopkerton/program/service/ProgramService.java +++ b/src/main/java/org/sopt/sopkerton/program/service/ProgramService.java @@ -65,6 +65,7 @@ public ProgramDetailResponse getProgramDetail(Long userId, Long programId) { .orElseThrow(() -> new ApplyException(ApplyError.APPLY_NOT_FOUND)); boolean isApply = convertToIsApply(apply.getIsApply()); return new ProgramDetailResponse( + program.getTitle(), program.getImageUrl(), program.getContent(), program.getOrganizationName(),