From 9147fb63313d2a8c4b47195fe8ee70d00c6313d8 Mon Sep 17 00:00:00 2001 From: muhsroom1324 Date: Wed, 13 Nov 2024 09:09:58 +0900 Subject: [PATCH] feature: add original link to dto --- .../java/com/example/newsfit/domain/article/dto/GetArticle.java | 2 ++ .../example/newsfit/domain/article/service/ArticleService.java | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/example/newsfit/domain/article/dto/GetArticle.java b/src/main/java/com/example/newsfit/domain/article/dto/GetArticle.java index 24154ea..8bbe539 100644 --- a/src/main/java/com/example/newsfit/domain/article/dto/GetArticle.java +++ b/src/main/java/com/example/newsfit/domain/article/dto/GetArticle.java @@ -14,6 +14,7 @@ public record GetArticle( @Schema(description = "이미지") List images, @Schema(description = "언론사") Press press, @Schema(description = "카테고리") String category, + @Schema(description = "원본 링크") String articleSource, @Schema(description = "댓글") List comment, @Schema(description = "좋아요 수") Integer likeCount, @Schema(description = "내가 좋아요했는지 여부") Boolean likedArticle @@ -37,6 +38,7 @@ public static GetArticle of(Article article, Boolean isLikedArticle) { article.getImages(), article.getPress(), article.getCategory().toString(), + article.getArticleSource(), getComments(article), article.getLikeCount(), isLikedArticle diff --git a/src/main/java/com/example/newsfit/domain/article/service/ArticleService.java b/src/main/java/com/example/newsfit/domain/article/service/ArticleService.java index 8d1cd7d..bd51460 100644 --- a/src/main/java/com/example/newsfit/domain/article/service/ArticleService.java +++ b/src/main/java/com/example/newsfit/domain/article/service/ArticleService.java @@ -85,7 +85,6 @@ public GetArticles postArticle(String requestBody) throws ParseException { try { recommenderUtils.registerArticle(article); - } catch (JsonProcessingException e) { e.printStackTrace();