라이브, 콘텐츠 메인 - 새로운 콘텐츠, 큐레이션

- 민감한 콘텐츠(19금) 설정 추가
This commit is contained in:
Yu Sung
2024-10-11 12:18:38 +09:00
parent a2b8a105fe
commit 46df6864b0
4 changed files with 44 additions and 10 deletions

View File

@@ -79,11 +79,24 @@ final class ContentRepository {
}
func getNewContentOfTheme(theme: String) -> AnyPublisher<Response, MoyaError> {
return api.requestPublisher(.getNewContentOfTheme(theme: theme))
return api.requestPublisher(
.getNewContentOfTheme(
theme: theme,
isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible),
contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL
)
)
}
func getCurationList(page: Int, size: Int) -> AnyPublisher<Response, MoyaError> {
return api.requestPublisher(.getCurationList(page: page, size: size))
return api.requestPublisher(
.getCurationList(
isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible),
contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL,
page: page,
size: size
)
)
}
func donation(contentId: Int, can: Int, comment: String) -> AnyPublisher<Response, MoyaError> {
@@ -99,7 +112,15 @@ final class ContentRepository {
}
func getNewContentAllOfTheme(theme: String, page: Int, size: Int) -> AnyPublisher<Response, MoyaError> {
return api.requestPublisher(.getNewContentAllOfTheme(theme: theme, page: page, size: size))
return api.requestPublisher(
.getNewContentAllOfTheme(
theme: theme,
isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible),
contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL,
page: page,
size: size
)
)
}
func getAudioContentListByCurationId(curationId: Int, page: Int, size: Int, sort: ContentCurationViewModel.Sort) -> AnyPublisher<Response, MoyaError> {