클라이언트 메시지 다국어 처리

This commit is contained in:
2025-12-23 19:22:06 +09:00
parent e987a56544
commit 60e654cda9
11 changed files with 132 additions and 47 deletions

View File

@@ -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(

View File

@@ -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!!,