合并 9.9.1 机巢工作台与拍摄交付流程 #1
@@ -121,11 +121,11 @@ final class TrainingAPI: TrainingDataServing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func read<Response: Decodable>(_ path: String, query: [URLQueryItem] = []) async throws -> Response {
|
private func read<Response: Decodable>(_ path: String, query: [URLQueryItem] = []) async throws -> Response {
|
||||||
try await perform(APIRequest<Response>(method: .get, path: prefix + path, queryItems: query, logsPayload: false))
|
try await perform(APIRequest<Response>(method: .get, path: prefix + path, queryItems: query))
|
||||||
}
|
}
|
||||||
|
|
||||||
private func write<Response: Decodable, Body: Encodable>(_ method: HTTPMethod, _ path: String, body: Body) async throws -> Response {
|
private func write<Response: Decodable, Body: Encodable>(_ method: HTTPMethod, _ path: String, body: Body) async throws -> Response {
|
||||||
try await perform(APIRequest<Response>(method: method, path: prefix + path, body: body, logsPayload: false))
|
try await perform(APIRequest<Response>(method: method, path: prefix + path, body: body))
|
||||||
}
|
}
|
||||||
|
|
||||||
private func perform<Response: Decodable>(_ request: APIRequest<Response>) async throws -> Response {
|
private func perform<Response: Decodable>(_ request: APIRequest<Response>) async throws -> Response {
|
||||||
|
|||||||
Reference in New Issue
Block a user