feat(audio-recommendation): 오디오 추천 조회 endpoint를 추가한다

This commit is contained in:
2026-06-23 16:14:56 +09:00
parent 33b3d3e41b
commit 7212067101
3 changed files with 125 additions and 0 deletions

View File

@@ -102,6 +102,7 @@ class SecurityConfig(
.antMatchers(HttpMethod.GET, "/api/chat/original/list").permitAll()
.antMatchers(HttpMethod.POST, "/charge/payverse/webhook").permitAll()
.antMatchers(HttpMethod.GET, "/api/v2/home/recommendations").permitAll()
.antMatchers(HttpMethod.GET, "/api/v2/audio/recommendations").permitAll()
.antMatchers(HttpMethod.GET, "/api/v2/home/rankings/creators").permitAll()
// 페이지네이션 하위 경로(/lives, /debut-creators 등)는 인증 필수
.antMatchers(HttpMethod.GET, "/api/v2/home/recommendations/**").authenticated()

View File

@@ -0,0 +1,22 @@
package kr.co.vividnext.sodalive.v2.api.audio.recommendation.adapter.`in`.web
import kr.co.vividnext.sodalive.common.ApiResponse
import kr.co.vividnext.sodalive.member.Member
import kr.co.vividnext.sodalive.v2.api.audio.recommendation.application.AudioRecommendationFacade
import org.springframework.security.core.annotation.AuthenticationPrincipal
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
@RestController
@RequestMapping("/api/v2/audio/recommendations")
class AudioRecommendationController(
private val audioRecommendationFacade: AudioRecommendationFacade
) {
@GetMapping
fun getRecommendations(
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?
) = run {
ApiResponse.ok(audioRecommendationFacade.getRecommendations(member))
}
}