File tree Expand file tree Collapse file tree
src/main/kotlin/com/numberone/daepiro/domain/community/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,12 +131,12 @@ class ArticleService(
131131 isLocationVisible = request.visibility ? : article.isLocationVisible,
132132 )
133133
134+
135+ fileRepository.deleteAllByDocumentTypeAndDocumentId(
136+ documentType = FileDocumentType .ARTICLE ,
137+ documentId = article.id!! ,
138+ )
134139 attachFileList?.let { files ->
135- // 해당 아티클에 매핑된 파일을 모두 제거하고
136- fileRepository.deleteAllByDocumentTypeAndDocumentId(
137- documentType = FileDocumentType .ARTICLE ,
138- documentId = article.id!! ,
139- )
140140 // 새로 요청온 파일을 적용함
141141 eventPublisher.publishEvent(ArticleFileUploadEvent (article.id!! , files.map { RawFile .of(it) }))
142142 }
@@ -335,7 +335,7 @@ class ArticleService(
335335 documentId = article.id!! ,
336336 )
337337 )
338- if (article.type== ArticleType .DONGNE ) {
338+ if (article.type == ArticleType .DONGNE ) {
339339 notificationService.sendNotification(
340340 users = listOf (article.authUser!! ),
341341 title = " ${user.nickname} 님이 내 게시글을 좋아해요." ,
You can’t perform that action at this time.
0 commit comments