콘텐츠 상세 - 콘텐츠 고정/해제 기능 추가
This commit is contained in:
		@@ -34,6 +34,8 @@ enum ContentApi {
 | 
			
		||||
    case getAudioContentListByCurationId(curationId: Int, page: Int, size: Int, sort: ContentCurationViewModel.Sort)
 | 
			
		||||
    case getContentRanking(page: Int, size: Int, sortType: String)
 | 
			
		||||
    case getContentRankingSortType
 | 
			
		||||
    case pinContent(contentId: Int)
 | 
			
		||||
    case unpinContent(contentId: Int)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
extension ContentApi: TargetType {
 | 
			
		||||
@@ -117,6 +119,12 @@ extension ContentApi: TargetType {
 | 
			
		||||
            
 | 
			
		||||
        case .getContentRankingSortType:
 | 
			
		||||
            return  "/audio-content/ranking-sort-type"
 | 
			
		||||
            
 | 
			
		||||
        case .pinContent(let contentId):
 | 
			
		||||
            return  "/audio-content/pin-to-the-top/\(contentId)"
 | 
			
		||||
            
 | 
			
		||||
        case .unpinContent(let contentId):
 | 
			
		||||
            return  "/audio-content/unpin-at-the-top/\(contentId)"
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
@@ -131,10 +139,10 @@ extension ContentApi: TargetType {
 | 
			
		||||
        case .getMainBannerList, .getMainOrderList, .getNewContentUploadCreatorList, .getCurationList:
 | 
			
		||||
            return .get
 | 
			
		||||
            
 | 
			
		||||
        case .likeContent, .modifyAudioContent, .modifyComment:
 | 
			
		||||
        case .likeContent, .modifyAudioContent, .modifyComment, .unpinContent:
 | 
			
		||||
            return .put
 | 
			
		||||
            
 | 
			
		||||
        case .registerComment, .orderAudioContent, .addAllPlaybackTracking, .uploadAudioContent, .donation:
 | 
			
		||||
        case .registerComment, .orderAudioContent, .addAllPlaybackTracking, .uploadAudioContent, .donation, .pinContent:
 | 
			
		||||
            return .post
 | 
			
		||||
            
 | 
			
		||||
        case .deleteAudioContent:
 | 
			
		||||
@@ -259,6 +267,9 @@ extension ContentApi: TargetType {
 | 
			
		||||
            ] as [String : Any]
 | 
			
		||||
            
 | 
			
		||||
            return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
 | 
			
		||||
            
 | 
			
		||||
        case .pinContent, .unpinContent:
 | 
			
		||||
            return .requestPlain
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user