커뮤니티 게시물 등록 API 적용,
채널 프로필 API - 커뮤니티 게시물 추가
This commit is contained in:
@@ -36,6 +36,7 @@ final class UserProfileViewModel: ObservableObject {
|
||||
@Published var navigationTitle = "채널"
|
||||
|
||||
@Published private(set) var creatorProfile: GetCreatorProfileResponse?
|
||||
@Published private(set) var communityPostList = [GetCommunityPostListResponse]()
|
||||
|
||||
@Published var isShowShareView = false
|
||||
@Published var shareMessage = ""
|
||||
@@ -73,6 +74,9 @@ final class UserProfileViewModel: ObservableObject {
|
||||
if let data = decoded.data, decoded.success {
|
||||
self.creatorProfile = data
|
||||
self.navigationTitle = "\(data.creator.nickname)님의 채널"
|
||||
|
||||
self.communityPostList.removeAll()
|
||||
self.communityPostList.append(contentsOf: data.communityPostList)
|
||||
} else {
|
||||
if let message = decoded.message {
|
||||
self.errorMessage = message
|
||||
|
Reference in New Issue
Block a user