Share same build number in API
This commit is contained in:
parent
adbc086061
commit
d2c4298f2d
|
@ -171,9 +171,9 @@ public class ProviderManager: ObservableObject, RateLimited {
|
|||
.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
guard self.appBuild >= infrastructure.buildNumber else {
|
||||
pp_log.error("Infrastructure requires app build >= \(infrastructure.buildNumber) (app is \(self.appBuild))")
|
||||
return Fail(error: ProviderManagerError.outdatedBuild(self.appBuild, infrastructure.buildNumber))
|
||||
guard self.appBuild >= infrastructure.build else {
|
||||
pp_log.error("Infrastructure requires app build >= \(infrastructure.build) (app is \(self.appBuild))")
|
||||
return Fail(error: ProviderManagerError.outdatedBuild(self.appBuild, infrastructure.build))
|
||||
.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
|
|
|
@ -38,17 +38,7 @@ public struct WSProviderInfrastructure: Codable {
|
|||
public let countryCode: String
|
||||
}
|
||||
|
||||
public let build: [String: Int]
|
||||
|
||||
public var buildNumber: Int {
|
||||
var num: Int?
|
||||
#if os(iOS)
|
||||
num = build["ios"]
|
||||
#else
|
||||
num = build["macos"]
|
||||
#endif
|
||||
return num ?? 0
|
||||
}
|
||||
public let build: Int
|
||||
|
||||
public let name: WSProviderName
|
||||
|
||||
|
|
Loading…
Reference in New Issue