앱 - 오디션 상세 API
This commit is contained in:
@@ -6,6 +6,7 @@ import kr.co.vividnext.sodalive.member.Member
|
||||
import org.springframework.data.domain.Pageable
|
||||
import org.springframework.security.core.annotation.AuthenticationPrincipal
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.PathVariable
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@@ -27,4 +28,14 @@ class AuditionController(private val service: AuditionService) {
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
fun getAuditionDetail(
|
||||
@PathVariable id: Long,
|
||||
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?
|
||||
) = run {
|
||||
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
|
||||
|
||||
ApiResponse.ok(service.getAuditionDetail(auditionId = id))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user