큐레이션 콘텐츠
- 남성향이면 여성 크리에이터, 여성향이면 남성 크리에이터 작품만 조회되도록 수정
This commit is contained in:
@@ -31,7 +31,7 @@ enum ContentApi {
|
|||||||
case modifyComment(request: ModifyCommentRequest)
|
case modifyComment(request: ModifyCommentRequest)
|
||||||
case getNewContentThemeList
|
case getNewContentThemeList
|
||||||
case getNewContentAllOfTheme(theme: String, isAdultContentVisible: Bool, contentType: ContentType, page: Int, size: Int)
|
case getNewContentAllOfTheme(theme: String, isAdultContentVisible: Bool, contentType: ContentType, page: Int, size: Int)
|
||||||
case getAudioContentListByCurationId(curationId: Int, page: Int, size: Int, sort: ContentCurationViewModel.Sort)
|
case getAudioContentListByCurationId(curationId: Int, isAdultContentVisible: Bool, contentType: ContentType, page: Int, size: Int, sort: ContentCurationViewModel.Sort)
|
||||||
case getContentRanking(page: Int, size: Int, sortType: String)
|
case getContentRanking(page: Int, size: Int, sortType: String)
|
||||||
case getContentRankingSortType
|
case getContentRankingSortType
|
||||||
case pinContent(contentId: Int)
|
case pinContent(contentId: Int)
|
||||||
@@ -112,7 +112,7 @@ extension ContentApi: TargetType {
|
|||||||
case .getNewContentAllOfTheme:
|
case .getNewContentAllOfTheme:
|
||||||
return "/audio-content/main/new/all"
|
return "/audio-content/main/new/all"
|
||||||
|
|
||||||
case .getAudioContentListByCurationId(let curationId, _, _, _):
|
case .getAudioContentListByCurationId(let curationId, _, _, _, _, _):
|
||||||
return "/audio-content/curation/\(curationId)"
|
return "/audio-content/curation/\(curationId)"
|
||||||
|
|
||||||
case .getContentRanking:
|
case .getContentRanking:
|
||||||
@@ -250,8 +250,10 @@ extension ContentApi: TargetType {
|
|||||||
|
|
||||||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||||
|
|
||||||
case .getAudioContentListByCurationId(_, let page, let size, let sort):
|
case .getAudioContentListByCurationId(_, let isAdultContentVisible, let contentType, let page, let size, let sort):
|
||||||
let parameters = [
|
let parameters = [
|
||||||
|
"isAdultContentVisible": isAdultContentVisible,
|
||||||
|
"contentType": contentType,
|
||||||
"page": page - 1,
|
"page": page - 1,
|
||||||
"size": size,
|
"size": size,
|
||||||
"sort-type": sort
|
"sort-type": sort
|
||||||
|
|||||||
@@ -124,7 +124,16 @@ final class ContentRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getAudioContentListByCurationId(curationId: Int, page: Int, size: Int, sort: ContentCurationViewModel.Sort) -> AnyPublisher<Response, MoyaError> {
|
func getAudioContentListByCurationId(curationId: Int, page: Int, size: Int, sort: ContentCurationViewModel.Sort) -> AnyPublisher<Response, MoyaError> {
|
||||||
return api.requestPublisher(.getAudioContentListByCurationId(curationId: curationId, page: page, size: size, sort: sort))
|
return api.requestPublisher(
|
||||||
|
.getAudioContentListByCurationId(
|
||||||
|
curationId: curationId,
|
||||||
|
isAdultContentVisible: UserDefaults.isAdultContentVisible(),
|
||||||
|
contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL,
|
||||||
|
page: page,
|
||||||
|
size: size,
|
||||||
|
sort: sort
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getContentRankingSortType() -> AnyPublisher<Response, MoyaError> {
|
func getContentRankingSortType() -> AnyPublisher<Response, MoyaError> {
|
||||||
|
|||||||
Reference in New Issue
Block a user