test #332

Merged
klaus merged 15 commits from test into main 2025-07-18 12:33:22 +00:00
2 changed files with 22 additions and 4 deletions
Showing only changes of commit 8e877a6366 - Show all commits

View File

@ -236,4 +236,24 @@ class AudioContentController(private val service: AudioContentService) {
ApiResponse.ok(service.unpinAtTheTop(contentId = id, member = member))
}
@GetMapping("/replay-live")
fun replayLive(
@RequestParam("isAdultContentVisible", required = false) isAdultContentVisible: Boolean? = null,
@RequestParam("contentType", required = false) contentType: ContentType? = null,
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?
) = run {
ApiResponse.ok(
service.getLatestContentByTheme(
theme = listOf("다시듣기"),
contentType = contentType ?: ContentType.ALL,
isFree = false,
isAdult = if (member != null) {
(isAdultContentVisible ?: true) && member.auth != null
} else {
false
}
)
)
}
}

View File

@ -490,10 +490,8 @@ class AudioContentQueryRepositoryImpl(
where = where.and(audioContentTheme.theme.`in`(theme))
}
where = if (isFree) {
where.and(audioContent.price.loe(0))
} else {
where.and(audioContent.price.gt(0))
if (isFree) {
where = where.and(audioContent.price.loe(0))
}
return queryFactory