feat(ios): add device details and reliable ipa build
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import Foundation
|
||||
|
||||
public enum UpstreamRoute: Equatable, Sendable {
|
||||
public enum UpstreamRoute: Hashable, Sendable {
|
||||
case health
|
||||
case device
|
||||
case sim
|
||||
case network
|
||||
case signalStrength
|
||||
case stats
|
||||
case statsCpu
|
||||
case connectivity
|
||||
case smsList(limit: Int, offset: Int, direction: String?)
|
||||
case smsSend(phoneNumber: String, content: String)
|
||||
@@ -15,7 +17,8 @@ public enum UpstreamRoute: Equatable, Sendable {
|
||||
|
||||
public var method: String {
|
||||
switch self {
|
||||
case .health, .device, .sim, .network, .signalStrength, .connectivity, .smsList:
|
||||
case .health, .device, .sim, .network, .signalStrength, .stats, .statsCpu,
|
||||
.connectivity, .smsList:
|
||||
return "GET"
|
||||
case .smsSend, .smsBatchDelete, .authLogin, .authLogout:
|
||||
return "POST"
|
||||
@@ -29,6 +32,8 @@ public enum UpstreamRoute: Equatable, Sendable {
|
||||
case .sim: return "/api/sim"
|
||||
case .network: return "/api/network"
|
||||
case .signalStrength: return "/api/network/signal-strength"
|
||||
case .stats: return "/api/stats"
|
||||
case .statsCpu: return "/api/stats/cpu"
|
||||
case .connectivity: return "/api/connectivity"
|
||||
case .smsList(let limit, let offset, let direction):
|
||||
var items = ["limit=\(limit)", "offset=\(offset)"]
|
||||
|
||||
Reference in New Issue
Block a user