커뮤니티 댓글
- 수정 / 삭제 API 적용
This commit is contained in:
@@ -15,6 +15,7 @@ enum CreatorCommunityApi {
|
||||
case createCommunityPostComment(comment: String, postId: Int, parentId: Int?)
|
||||
case getCommunityPostCommentList(postId: Int, page: Int, size: Int)
|
||||
case getCommentReplyList(commentId: Int, page: Int, size: Int)
|
||||
case modifyComment(request: ModifyCommunityPostCommentRequest)
|
||||
}
|
||||
|
||||
extension CreatorCommunityApi: TargetType {
|
||||
@@ -30,7 +31,7 @@ extension CreatorCommunityApi: TargetType {
|
||||
case .communityPostLike:
|
||||
return "/creator-community/like"
|
||||
|
||||
case .createCommunityPostComment:
|
||||
case .createCommunityPostComment, .modifyComment:
|
||||
return "/creator-community/comment"
|
||||
|
||||
case .getCommunityPostCommentList(let postId, _, _):
|
||||
@@ -48,6 +49,9 @@ extension CreatorCommunityApi: TargetType {
|
||||
|
||||
case .getCommunityPostList, .getCommunityPostCommentList, .getCommentReplyList:
|
||||
return .get
|
||||
|
||||
case .modifyComment:
|
||||
return .put
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +92,9 @@ extension CreatorCommunityApi: TargetType {
|
||||
"timezone": TimeZone.current.identifier
|
||||
] as [String: Any]
|
||||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
|
||||
|
||||
case .modifyComment(let request):
|
||||
return .requestJSONEncodable(request)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user