커뮤니티 게시물 삭제 API 적용
This commit is contained in:
@@ -10,6 +10,7 @@ import Moya
|
||||
|
||||
enum CreatorCommunityApi {
|
||||
case createCommunityPost(parameters: [MultipartFormData])
|
||||
case modifyCommunityPost(parameters: [MultipartFormData])
|
||||
case getCommunityPostList(creatorId: Int, page: Int, size: Int)
|
||||
case communityPostLike(postId: Int)
|
||||
case createCommunityPostComment(comment: String, postId: Int, parentId: Int?)
|
||||
@@ -25,7 +26,7 @@ extension CreatorCommunityApi: TargetType {
|
||||
|
||||
var path: String {
|
||||
switch self {
|
||||
case .createCommunityPost, .getCommunityPostList:
|
||||
case .createCommunityPost, .getCommunityPostList, .modifyCommunityPost:
|
||||
return "/creator-community"
|
||||
|
||||
case .communityPostLike:
|
||||
@@ -50,7 +51,7 @@ extension CreatorCommunityApi: TargetType {
|
||||
case .getCommunityPostList, .getCommunityPostCommentList, .getCommentReplyList:
|
||||
return .get
|
||||
|
||||
case .modifyComment:
|
||||
case .modifyComment, .modifyCommunityPost:
|
||||
return .put
|
||||
}
|
||||
}
|
||||
@@ -60,6 +61,9 @@ extension CreatorCommunityApi: TargetType {
|
||||
case .createCommunityPost(let parameters):
|
||||
return .uploadMultipart(parameters)
|
||||
|
||||
case .modifyCommunityPost(let parameters):
|
||||
return .uploadMultipart(parameters)
|
||||
|
||||
case .getCommunityPostList(let creatorId, let page, let size):
|
||||
let parameters = [
|
||||
"creatorId": creatorId,
|
||||
@@ -95,6 +99,7 @@ extension CreatorCommunityApi: TargetType {
|
||||
|
||||
case .modifyComment(let request):
|
||||
return .requestJSONEncodable(request)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user