Files
steipete--codexbar/Sources/CodexBar/Providers/Sub2API/Sub2APISettingsStore.swift
T
2026-07-13 12:22:33 +08:00

24 lines
776 B
Swift

import CodexBarCore
import Foundation
extension SettingsStore {
var sub2APIAPIKey: String {
get { self.configSnapshot.providerConfig(for: .sub2api)?.sanitizedAPIKey ?? "" }
set {
self.updateProviderConfig(provider: .sub2api) { entry in
entry.apiKey = self.normalizedConfigValue(newValue)
}
self.logSecretUpdate(provider: .sub2api, field: "apiKey", value: newValue)
}
}
var sub2APIBaseURL: String {
get { self.configSnapshot.providerConfig(for: .sub2api)?.sanitizedEnterpriseHost ?? "" }
set {
self.updateProviderConfig(provider: .sub2api) { entry in
entry.enterpriseHost = self.normalizedConfigValue(newValue)
}
}
}
}