Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public struct AppMetadata: Sendable {
buildVersion
case .apiURL:
Bundle.main.object(forInfoDictionaryKey: "API_SERVER_URL") as! String
case .language:
Bundle.main.preferredLocalizations.first?.hasPrefix("en") == true ? "en" : "ko"
}
}

Expand All @@ -62,7 +64,7 @@ extension AppMetadata: DependencyKey {
}

public enum AppMetadataKey: CaseIterable {
case appVersion, appType, osType, osVersion, apiKey, buildNumber, deviceID, deviceModel, apiURL
case appVersion, appType, osType, osVersion, apiKey, buildNumber, deviceID, deviceModel, apiURL, language

public var keyForHeader: String? {
switch self {
Expand All @@ -82,6 +84,8 @@ public enum AppMetadataKey: CaseIterable {
"x-device-id"
case .deviceModel:
"x-device-model"
case .language:
"x-language"
case .apiURL:
nil
}
Expand Down
Loading