test #332
| @@ -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 | ||||
|                 } | ||||
|             ) | ||||
|         ) | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user