콘텐츠 상세

- 댓글이 없을 때 유료 콘텐츠를 구매한 사람이 비밀댓글을 등록할 수 있는 기능 추가
This commit is contained in:
Yu Sung
2024-08-30 17:15:13 +09:00
parent ca9dee5574
commit fa849dd5b6
5 changed files with 33 additions and 14 deletions

View File

@@ -239,14 +239,14 @@ final class ContentDetailViewModel: ObservableObject {
}
}
func registerComment(comment: String) {
func registerComment(comment: String, isSecret: Bool) {
if comment.trimmingCharacters(in: .whitespaces).isEmpty {
return
}
isLoading = true
repository.registerComment(audioContentId: contentId, comment: comment)
repository.registerComment(audioContentId: contentId, comment: comment, isSecret: isSecret)
.sink { result in
switch result {
case .finished: