feat(community): 크리에이터 커뮤니티 게시물 고정 기능을 추가한다
This commit is contained in:
@@ -8,6 +8,11 @@
|
||||
import Foundation
|
||||
import Moya
|
||||
|
||||
struct UpdateCommunityPostFixedRequest: Encodable {
|
||||
let postId: Int
|
||||
let isFixed: Bool
|
||||
}
|
||||
|
||||
enum CreatorCommunityApi {
|
||||
case createCommunityPost(parameters: [MultipartFormData])
|
||||
case modifyCommunityPost(parameters: [MultipartFormData])
|
||||
@@ -20,6 +25,7 @@ enum CreatorCommunityApi {
|
||||
case modifyComment(request: ModifyCommunityPostCommentRequest)
|
||||
case getLatestPostListFromCreatorsYouFollow
|
||||
case purchaseCommunityPost(postId: Int)
|
||||
case updateCommunityPostFixed(request: UpdateCommunityPostFixedRequest)
|
||||
}
|
||||
|
||||
extension CreatorCommunityApi: TargetType {
|
||||
@@ -52,6 +58,9 @@ extension CreatorCommunityApi: TargetType {
|
||||
|
||||
case .purchaseCommunityPost:
|
||||
return "/creator-community/purchase"
|
||||
|
||||
case .updateCommunityPostFixed:
|
||||
return "/creator-community/fixed"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +72,7 @@ extension CreatorCommunityApi: TargetType {
|
||||
case .getCommunityPostList, .getCommunityPostCommentList, .getCommentReplyList, .getCommunityPostDetail, .getLatestPostListFromCreatorsYouFollow:
|
||||
return .get
|
||||
|
||||
case .modifyComment, .modifyCommunityPost:
|
||||
case .modifyComment, .modifyCommunityPost, .updateCommunityPostFixed:
|
||||
return .put
|
||||
}
|
||||
}
|
||||
@@ -122,6 +131,9 @@ extension CreatorCommunityApi: TargetType {
|
||||
|
||||
case .purchaseCommunityPost(let postId):
|
||||
return .requestJSONEncodable(PurchasePostRequest(postId: postId))
|
||||
|
||||
case .updateCommunityPostFixed(let request):
|
||||
return .requestJSONEncodable(request)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user