-
Notifications
You must be signed in to change notification settings - Fork 0
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
🔀 :: (ENTRY-203)공지사항 상세조회 API 변경 #49
The head ref may contain hidden characters: "\uACF5\uC9C0\uC0AC\uD56D\uC870\uD68C\uBCC0\uACBD"
Conversation
rudeh2926
commented
Jun 30, 2024
@@ -20,10 +21,13 @@ class QueryDetailsNoticeService( | |||
val notice = noticeRepository.findByIdOrNull(noticeId) ?: throw NoticeNotFoundException | |||
val imageURL = notice.fileName?.let { getUrl(it, PathList.NOTICE) } | |||
|
|||
val attachFileUrls = | |||
val attachFile = |
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.
내가 왜 확인 못했지...싶긴 한데 굳이 generateObjectUrl을 getUrl 함수로 감쌀 필요가 있나 싶음
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.
attachfile이랑 image에 똑같이 fileUtil.generateObjectUrl 하는것보다 함수로 따로뺴서 하는게 좋다고 생각했기 때문입니다
@@ -9,5 +9,10 @@ data class QueryDetailsNoticeResponse( | |||
val createdAt: LocalDateTime, | |||
val type: NoticeType, | |||
val imageURL: String?, | |||
val attachFileUrl: List<String> = emptyList() | |||
val attachFile: List<AttachFile> |
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.
attachFiles가 맞을듯 그래도. 타입은 복수형이니까 네이밍 지켜야지
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.
변경하겠습니다
AttachFile( | ||
attachFileUrl = getUrl(it.attachFileName, PathList.ATTACH_FILE), | ||
attachFileName = it.attachFileName | ||
) | ||
} ?: emptyList() |
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.
이거 nullcheck 안해도 자연스럽게 emptyList 되지 않나?
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.
여기다가 주석으로 왜 클래스타입을 List로 변환하는지 설명하는게 좋을듯
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.
넵
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.