Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #131 from News-Sseuk/feature/114
Browse files Browse the repository at this point in the history
[FIX] 반환값 버그 픽싱2
  • Loading branch information
yuuddin authored Nov 19, 2024
2 parents 1b398f7 + dea913f commit dd3ca92
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.time.LocalDateTime;
import java.util.List;

@RestController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.mongodb.lang.Nullable;
import lombok.*;

import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -42,8 +43,11 @@ public ArticleResponseDto(ArticleRedisEntity article) {
this.image = article.getImage();
this.content = article.getContent();
this.category = article.getCategory();
this.hashTagList = article.getHashTagList().stream()
.map(ArticleHashTagDTO::getHashTagName).distinct()
this.hashTagList = article.getHashTagList() == null
? Collections.singletonList("더미")
: article.getHashTagList().stream()
.map(ArticleHashTagDTO::getHashTagName)
.distinct()
.collect(Collectors.toList());
this.reliability = article.getReliability();
this.summary = article.getSummary();
Expand Down

0 comments on commit dd3ca92

Please sign in to comment.