응원글 삭제 기능 추가

This commit is contained in:
Yu Sung
2023-09-09 00:02:39 +09:00
parent b31933715d
commit 5d95c0f1c9
10 changed files with 227 additions and 131 deletions

View File

@@ -224,7 +224,7 @@ final class UserProfileFanTalkViewModel: ObservableObject {
.store(in: &subscription)
}
func modifyCheersReply(cheersId: Int, creatorId: Int, cheersReplyContent: String) {
func modifyCheers(cheersId: Int, creatorId: Int, cheersReplyContent: String) {
if cheersReplyContent.trimmingCharacters(in: .whitespaces).isEmpty {
if let errorPopup = errorPopup {
errorPopup("내용을 입력하세요")
@@ -241,7 +241,7 @@ final class UserProfileFanTalkViewModel: ObservableObject {
}
isLoading = true
repository.modifyCheers(cheersId: cheersId, content: cheersReplyContent)
repository.modifyCheers(cheersId: cheersId, content: cheersReplyContent, isActive: nil)
.sink { result in
switch result {
case .finished: