From 7ff9360b1ecb639df00dc5890dc1cd4bb09bd7ac Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Wed, 25 Feb 2026 15:30:38 +0900 Subject: [PATCH] =?UTF-8?q?fix(live-room):=20=EC=9C=A0=EB=A3=8C=20?= =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=20=EC=B5=9C=EC=86=8C=2030=EC=BA=94?= =?UTF-8?q?=20=EA=B2=80=EC=A6=9D=EC=9D=84=20=EC=B6=94=EA=B0=80=ED=95=9C?= =?UTF-8?q?=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SodaLive/Sources/I18n/I18n.swift | 1 + .../Room/Create/LiveRoomCreateViewModel.swift | 6 ++++++ docs/20260225_유료라이브최소30캔검증추가.md | 15 +++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 docs/20260225_유료라이브최소30캔검증추가.md diff --git a/SodaLive/Sources/I18n/I18n.swift b/SodaLive/Sources/I18n/I18n.swift index bd15dc2..78d2f18 100644 --- a/SodaLive/Sources/I18n/I18n.swift +++ b/SodaLive/Sources/I18n/I18n.swift @@ -688,6 +688,7 @@ enum I18n { static var enterTitle: String { pick(ko: "제목을 입력해 주세요.", en: "Please enter a title.", ja: "タイトルを入力してください。") } static var enterNoticeMin5: String { pick(ko: "공지를 5자 이상 입력해주세요.", en: "Please enter at least 5 characters for the notice.", ja: "お知らせは5文字以上で入力してください。") } static var enterPeopleRange: String { pick(ko: "인원을 3~999명 사이로 입력해주세요.", en: "Please enter the number of people between 3 and 999.", ja: "人数を3~999名の間で入力してください。") } + static var enterPaidPriceMin30: String { pick(ko: "유료 라이브는 30캔 이상 설정해주세요.", en: "For paid live, set at least 30 cans.", ja: "有料ライブは30can以上で設定してください。") } static var enterPassword6: String { pick(ko: "방 입장 비밀번호 6자리를 입력해 주세요.", en: "Please enter a 6-digit room entry password.", ja: "入室パスワード(6桁)を入力してください。") } } diff --git a/SodaLive/Sources/Live/Room/Create/LiveRoomCreateViewModel.swift b/SodaLive/Sources/Live/Room/Create/LiveRoomCreateViewModel.swift index f538ab3..112fa94 100644 --- a/SodaLive/Sources/Live/Room/Create/LiveRoomCreateViewModel.swift +++ b/SodaLive/Sources/Live/Room/Create/LiveRoomCreateViewModel.swift @@ -353,6 +353,12 @@ final class LiveRoomCreateViewModel: ObservableObject { self.isShowPopup = true return false } + + if price > 0 && price < 30 { + self.errorMessage = I18n.CreateLive.enterPaidPriceMin30 + self.isShowPopup = true + return false + } if roomType == .PRIVATE && (password.trimmingCharacters(in: .whitespaces).isEmpty || password.count != 6) { self.errorMessage = I18n.CreateLive.enterPassword6 diff --git a/docs/20260225_유료라이브최소30캔검증추가.md b/docs/20260225_유료라이브최소30캔검증추가.md new file mode 100644 index 0000000..cf6cf71 --- /dev/null +++ b/docs/20260225_유료라이브최소30캔검증추가.md @@ -0,0 +1,15 @@ +- [x] 유료 라이브 생성 시 최소 30캔 검증 로직 추가 +- [x] 관련 다국어 메시지 추가 및 연결 +- [x] 검증 실행 및 결과 기록 + +## 검증 기록 + +### 2026-02-25 유료 라이브 최소 30캔 검증 추가 +- 무엇: 유료 라이브(가격 > 0) 생성 시 가격이 30캔 미만이면 생성을 차단하는 검증을 추가했다. +- 왜: 저가(30캔 미만) 유료 라이브 생성 방지를 위한 정책 검증을 생성 전 단계에서 강제하기 위함이다. +- 어떻게: `lsp_diagnostics`로 변경 파일(`SodaLive/Sources/Live/Room/Create/LiveRoomCreateViewModel.swift`, `SodaLive/Sources/I18n/I18n.swift`)을 점검했다. +- 결과: SourceKit 환경 한계로 `No such module 'UIKit'`, `Cannot find 'LanguageHeaderProvider' in scope` 진단이 발생했다. +- 어떻게: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build`를 실행했다. +- 결과: `** BUILD SUCCEEDED **`. +- 어떻게: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test`를 실행했다. +- 결과: `Scheme SodaLive is not currently configured for the test action.`로 테스트 액션 미구성 상태를 확인했다.