-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[π§ μμ μ€] 리μμ€ μμ μ κ΄λ ¨ μ΄λ―Έμ§ νμΌλ μμ λλλ‘ κ΅¬ν #711
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -95,5 +95,14 @@ public void deleteTalkPick(Long talkPickId, ApiMember apiMember) { | |||||||||||
Member member = apiMember.toMember(memberRepository); | ||||||||||||
TalkPick talkPick = member.getTalkPickById(talkPickId); | ||||||||||||
talkPickRepository.delete(talkPick); | ||||||||||||
deleteFiles(talkPickId); | ||||||||||||
} | ||||||||||||
Comment on lines
+98
to
+99
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion νμΌ μμ μ€ν¨ μ νΈλμμ μ²λ¦¬ κ°μ νμ νμΌ μμ κ° μ€ν¨νλλΌλ TalkPick μν°ν°λ μ΄λ―Έ μμ λ μνκ° λ μ μμ΅λλ€. νμΌ μμ€ν μ μΌκ΄μ±μ μν΄ λ€μκ³Ό κ°μ κ°μ μ κ³ λ €ν΄λ³΄μΈμ:
@Transactional
public void deleteTalkPick(Long talkPickId, ApiMember apiMember) {
Member member = apiMember.toMember(memberRepository);
TalkPick talkPick = member.getTalkPickById(talkPickId);
+ deleteFiles(talkPickId);
talkPickRepository.delete(talkPick);
- deleteFiles(talkPickId);
} π Committable suggestion
Suggested change
|
||||||||||||
|
||||||||||||
private void deleteFiles(Long talkPickId) { | ||||||||||||
List<File> files = fileRepository.findAllByResourceIdAndFileType(talkPickId, TALK_PICK); | ||||||||||||
if (files.isEmpty()) { | ||||||||||||
return; | ||||||||||||
} | ||||||||||||
fileHandler.deleteFiles(files); | ||||||||||||
} | ||||||||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μμΈ μ²λ¦¬μ νΈλμμ κ΄λ¦¬κ° νμν©λλ€.
νμ¬ κ΅¬νμλ λ€μκ³Ό κ°μ κ°μ μ΄ νμν©λλ€:
λ€μκ³Ό κ°μ΄ κ°μ νλ κ²μ μ μλ립λλ€:
μΆκ°λ‘ μμΈ ν΄λμ€λ μμ±μ΄ νμν©λλ€: