feat(community): 크리에이터 커뮤니티 게시물 고정 기능을 추가한다

This commit is contained in:
Yu Sung
2026-03-17 10:41:28 +09:00
parent de627e1700
commit 5e08711b29
12 changed files with 241 additions and 48 deletions

View File

@@ -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)
}
}