클라이언트 메시지 다국어 처리
This commit is contained in:
@@ -22,7 +22,7 @@ class AudioContentThemeController(private val service: AudioContentThemeService)
|
||||
fun getThemes(
|
||||
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?
|
||||
) = run {
|
||||
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
|
||||
if (member == null) throw SodaException(messageKey = "common.error.bad_credentials")
|
||||
|
||||
ApiResponse.ok(service.getThemes())
|
||||
}
|
||||
@@ -35,7 +35,7 @@ class AudioContentThemeController(private val service: AudioContentThemeService)
|
||||
@RequestParam("contentType", required = false) contentType: ContentType? = null,
|
||||
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?
|
||||
) = run {
|
||||
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
|
||||
if (member == null) throw SodaException(messageKey = "common.error.bad_credentials")
|
||||
|
||||
ApiResponse.ok(
|
||||
service.getActiveThemeOfContent(
|
||||
@@ -56,7 +56,7 @@ class AudioContentThemeController(private val service: AudioContentThemeService)
|
||||
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?,
|
||||
pageable: Pageable
|
||||
) = run {
|
||||
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
|
||||
if (member == null) throw SodaException(messageKey = "common.error.bad_credentials")
|
||||
|
||||
ApiResponse.ok(
|
||||
service.getContentByTheme(
|
||||
|
||||
@@ -119,7 +119,7 @@ class AudioContentThemeService(
|
||||
limit: Long
|
||||
): GetContentByThemeResponse {
|
||||
val theme = queryRepository.findThemeByIdAndActive(themeId)
|
||||
?: throw SodaException("잘못된 요청입니다.")
|
||||
?: throw SodaException(messageKey = "common.error.invalid_request")
|
||||
|
||||
val totalCount = contentRepository.totalCountByTheme(
|
||||
memberId = member.id!!,
|
||||
|
||||
Reference in New Issue
Block a user