From 07f3697e1ec36c3ddc084559c3e0484fb0d6581b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=ED=98=84=EC=9A=B1?= <43662405+hyunw9@users.noreply.github.com> Date: Fri, 19 Jul 2024 20:21:57 +0900 Subject: [PATCH] =?UTF-8?q?Fix=20:=20=EC=A0=95=EC=A0=81=20=EB=8B=B5?= =?UTF-8?q?=EB=B3=80=20=EC=83=9D=EC=84=B1=EB=A1=9C=EC=A7=81=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20(#125)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix : 정적 답변 생성 로직 수정 * Fix : 생성한 Reply 반환하도록 수정 * Fix : 파이프라인 수정 --- .github/workflows/cicd-pipeline.yml | 8 ++++---- .../server/application/reply/ReplyCreator.java | 3 +++ .../server/application/reply/ReplyService.java | 2 ++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cicd-pipeline.yml b/.github/workflows/cicd-pipeline.yml index e993a3a..f4260fa 100644 --- a/.github/workflows/cicd-pipeline.yml +++ b/.github/workflows/cicd-pipeline.yml @@ -27,12 +27,12 @@ jobs: cat ./application.yml working-directory: ${{ env.working-directory }} - - name: reply.yml 생성 + - name: reply.yaml 생성 run: | mkdir -p ./src/main/resources && cd $_ - touch ./reply.yml - echo "${{ secrets.APP_REPLY }}" > ./reply.yml - cat ./reply.yml + touch ./reply.yaml + echo "${{ secrets.APP_REPLY }}" > ./reply.yaml + cat ./reply.yaml working-directory: ${{ env.working-directory }} # - name: logback-local-dev.xml 생성 diff --git a/src/main/java/com/donkeys_today/server/application/reply/ReplyCreator.java b/src/main/java/com/donkeys_today/server/application/reply/ReplyCreator.java index cfbd6b6..f3a22d5 100644 --- a/src/main/java/com/donkeys_today/server/application/reply/ReplyCreator.java +++ b/src/main/java/com/donkeys_today/server/application/reply/ReplyCreator.java @@ -17,6 +17,9 @@ public class ReplyCreator { public Reply createStaticReply(User user , LocalDate createdDate ) { Reply reply = Reply.createStaticReply(user, replyProperty.getComment(), createdDate); + public Reply createStaticReply(User user, LocalDate createdDate) { + log.info(replyProperty.getContent()); + Reply reply = Reply.createStaticReply(user, replyProperty.getContent(), createdDate); return replyRepository.save(reply); } diff --git a/src/main/java/com/donkeys_today/server/application/reply/ReplyService.java b/src/main/java/com/donkeys_today/server/application/reply/ReplyService.java index 7ee9828..1b0c3b5 100644 --- a/src/main/java/com/donkeys_today/server/application/reply/ReplyService.java +++ b/src/main/java/com/donkeys_today/server/application/reply/ReplyService.java @@ -38,8 +38,10 @@ public void removeReply(Long userId, int year, int month, int date) { } public void createStaticReply(User user, String createdDate) { + public Reply createStaticReply(User user, String createdDate) { LocalDate parsedCreatedDate = LocalDate.parse(createdDate); replyCreator.createStaticReply(user, parsedCreatedDate); + return replyCreator.createStaticReply(user, parsedCreatedDate); } private ReplyResponse serializeReply(Reply reply) {