From ee35244296be81f1f1a4637936b66e8a737322de Mon Sep 17 00:00:00 2001 From: Klaus Date: Wed, 12 Nov 2025 13:47:30 +0900 Subject: [PATCH] =?UTF-8?q?feat(content):=20=EC=BD=98=ED=85=90=EC=B8=A0=20?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EC=A1=B0=ED=9A=8C=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../content/AudioContentController.kt | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentController.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentController.kt index c9510ab..0572d23 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentController.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentController.kt @@ -237,6 +237,32 @@ class AudioContentController(private val service: AudioContentService) { ApiResponse.ok(service.unpinAtTheTop(contentId = id, member = member)) } + @GetMapping("/all") + fun getAllContents( + @RequestParam("isAdultContentVisible", required = false) isAdultContentVisible: Boolean? = null, + @RequestParam("contentType", required = false) contentType: ContentType? = null, + @RequestParam("isFree", required = false) isFree: Boolean? = null, + @RequestParam("isPointAvailableOnly", required = false) isPointAvailableOnly: Boolean? = null, + @AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?, + pageable: Pageable + ) = run { + ApiResponse.ok( + service.getLatestContentByTheme( + theme = emptyList(), + contentType = contentType ?: ContentType.ALL, + offset = pageable.offset, + limit = pageable.pageSize.toLong(), + isFree = isFree ?: false, + isAdult = if (member != null) { + (isAdultContentVisible ?: true) && member.auth != null + } else { + false + }, + isPointAvailableOnly = isPointAvailableOnly ?: false + ) + ) + } + @GetMapping("/replay-live") fun replayLive( @RequestParam("isAdultContentVisible", required = false) isAdultContentVisible: Boolean? = null,