커뮤니티 수정 UI, API 추가
This commit is contained in:
@@ -12,6 +12,7 @@ enum CreatorCommunityApi {
|
||||
case createCommunityPost(parameters: [MultipartFormData])
|
||||
case modifyCommunityPost(parameters: [MultipartFormData])
|
||||
case getCommunityPostList(creatorId: Int, page: Int, size: Int)
|
||||
case getCommunityPostDetail(postId: Int)
|
||||
case communityPostLike(postId: Int)
|
||||
case createCommunityPostComment(comment: String, postId: Int, parentId: Int?)
|
||||
case getCommunityPostCommentList(postId: Int, page: Int, size: Int)
|
||||
@@ -40,6 +41,9 @@ extension CreatorCommunityApi: TargetType {
|
||||
|
||||
case .getCommentReplyList(let commentId, _, _):
|
||||
return "/creator-community/comment/\(commentId)"
|
||||
|
||||
case .getCommunityPostDetail(let postId):
|
||||
return "/creator-community/\(postId)"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +52,7 @@ extension CreatorCommunityApi: TargetType {
|
||||
case .createCommunityPost, .communityPostLike, .createCommunityPostComment:
|
||||
return .post
|
||||
|
||||
case .getCommunityPostList, .getCommunityPostCommentList, .getCommentReplyList:
|
||||
case .getCommunityPostList, .getCommunityPostCommentList, .getCommentReplyList, .getCommunityPostDetail:
|
||||
return .get
|
||||
|
||||
case .modifyComment, .modifyCommunityPost:
|
||||
@@ -99,7 +103,10 @@ extension CreatorCommunityApi: TargetType {
|
||||
|
||||
case .modifyComment(let request):
|
||||
return .requestJSONEncodable(request)
|
||||
|
||||
|
||||
case .getCommunityPostDetail:
|
||||
let parameters = ["timezone": TimeZone.current.identifier] as [String: Any]
|
||||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user