fix(content): 성인 콘텐츠 설정 동기화와 국가별 인증 분기를 적용한다

This commit is contained in:
Yu Sung
2026-03-27 17:34:02 +09:00
parent 44daabdcae
commit 1d120b58bd
24 changed files with 1029 additions and 133 deletions

View File

@@ -0,0 +1,24 @@
import Foundation
struct UpdateContentPreferenceResponse: Decodable {
let isAdultContentVisible: Bool
let contentType: ContentType
enum CodingKeys: String, CodingKey {
case isAdultContentVisible
case contentType
}
init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
isAdultContentVisible = try container.decodeIfPresent(Bool.self, forKey: .isAdultContentVisible) ?? true
let rawContentType =
try container
.decodeIfPresent(String.self, forKey: .contentType)?
.trimmingCharacters(in: .whitespacesAndNewlines)
.uppercased()
contentType = ContentType(rawValue: rawContentType ?? "") ?? .ALL
}
}