Skip to content

Commit

Permalink
Merge pull request #354 from Team-Smeme/develop
Browse files Browse the repository at this point in the history
fix: updated update method
  • Loading branch information
thguss authored Dec 12, 2024
2 parents 7053add + c19ec71 commit 72045b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private int getCorrectionCount(long memberId) {
public void modifyDiary(long memberId, long diaryId, WriteDiaryRequest request) {
Diary foundDiary = diaryPort.findById(diaryId);
foundDiary.validateDiaryOwnership(memberId);
diaryPort.update(request.toDomain(foundDiary));
diaryPort.update(request.update(foundDiary));
correctionPort.deleteByDiary(diaryId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ public Diary toDomain(Member member) {
.build();
}

public Diary toDomain(Diary originDiary) {
public Diary update(Diary originDiary) {
return Diary.builder()
.id(originDiary.getId())
.content(content)
.targetLang(originDiary.getTargetLang())
.topicId(topicId)
.topicId(originDiary.getTopicId())
.memberId(originDiary.getMemberId())
.build();
}
Expand Down

0 comments on commit 72045b8

Please sign in to comment.