시리즈 콘텐츠 리스트 정렬

- 기본값을 NEWEST로 변경
This commit is contained in:
Klaus 2024-09-10 16:26:17 +09:00
parent 47748875c0
commit 5e01ece02b
2 changed files with 4 additions and 4 deletions

View File

@ -50,7 +50,7 @@ class ContentSeriesController(private val service: ContentSeriesService) {
@GetMapping("/{id}/content")
fun getSeriesContentList(
@PathVariable id: Long,
@RequestParam("sortType", required = false) sortType: SeriesSortType = SeriesSortType.OLDEST,
@RequestParam("sortType", required = false) sortType: SeriesSortType = SeriesSortType.NEWEST,
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?,
pageable: Pageable
) = run {

View File

@ -59,10 +59,10 @@ class ContentSeriesContentQueryRepositoryImpl(
.and(audioContent.isActive.isTrue)
.and(audioContent.duration.isNotNull)
var orderBy = seriesContent.createdAt.asc()
var orderBy = seriesContent.createdAt.desc()
if (sortType == SeriesSortType.NEWEST) {
orderBy = seriesContent.createdAt.desc()
if (sortType == SeriesSortType.OLDEST) {
orderBy = seriesContent.createdAt.asc()
}
if (!isAdult) {