Skip to content

Commit

Permalink
refactor(DocumentService): forEach 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
Chan531 committed Nov 26, 2024
1 parent e2bf6b7 commit 4d41d7b
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ private void validateFolder(final Long folderId, final long teamId) {

private void validateFileName(final Long folderId, final long teamId, final DocumentsCreateRequest request) {
List<Document> documents = documentFinder.findByTeamIdAndFolderId(teamId, folderId);
for (Document document : documents) {
checkFileNameIsDuplicated(document.getFileName(), request);
}
documents.forEach(document -> checkFileNameIsDuplicated(document.getFileName(), request));
}

private void checkFileNameIsDuplicated(final String fileName, final DocumentsCreateRequest request) {
Expand Down

0 comments on commit 4d41d7b

Please sign in to comment.