콘텐츠 메인
- 남성향, 여성향 콘텐츠 설정 적용 - 19금 콘텐츠 보기 여부 설정 적용
This commit is contained in:
@@ -15,7 +15,12 @@ final class ContentMainTabContentRepository {
|
||||
private let api = MoyaProvider<ContentApi>()
|
||||
|
||||
func getContentMainContent() -> AnyPublisher<Response, MoyaError> {
|
||||
return api.requestPublisher(.getContentMainContent)
|
||||
return api.requestPublisher(
|
||||
.getContentMainContent(
|
||||
isAdultContentVisible: UserDefaults.isAdultContentVisible(),
|
||||
contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
func getNewContentOfTheme(theme: String) -> AnyPublisher<Response, MoyaError> {
|
||||
@@ -29,14 +34,31 @@ final class ContentMainTabContentRepository {
|
||||
}
|
||||
|
||||
func getContentRanking(sortType: String) -> AnyPublisher<Response, MoyaError> {
|
||||
return api.requestPublisher(.getDailyContentRanking(sortType: sortType))
|
||||
return api.requestPublisher(
|
||||
.getDailyContentRanking(
|
||||
sortType: sortType,
|
||||
isAdultContentVisible: UserDefaults.isAdultContentVisible(),
|
||||
contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
func getRecommendContentByTag(tag: String) -> AnyPublisher<Response, MoyaError> {
|
||||
return api.requestPublisher(.getRecommendContentByTag(tag: tag))
|
||||
return api.requestPublisher(
|
||||
.getRecommendContentByTag(
|
||||
tag: tag,
|
||||
contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
func getPopularContentByCreator(creatorId: Int) -> AnyPublisher<Response, MoyaError> {
|
||||
return api.requestPublisher(.getContentMainContentPopularContentByCreator(creatorId: creatorId))
|
||||
return api.requestPublisher(
|
||||
.getContentMainContentPopularContentByCreator(
|
||||
creatorId: creatorId,
|
||||
isAdultContentVisible: UserDefaults.isAdultContentVisible(),
|
||||
contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user