Skip to content

Commit

Permalink
Fix : 정적 답변 생성로직 변경 (#125)
Browse files Browse the repository at this point in the history
* Fix : 정적 답변 생성 로직 수정

* Fix : 생성한 Reply 반환하도록 수정

* Fix : 파이프라인 수정
  • Loading branch information
hyunw9 authored Jul 19, 2024
1 parent 70fdfc4 commit 07f3697
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cicd-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 생성
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 07f3697

Please sign in to comment.