WIP: UI for adding config

This commit is contained in:
Jett Chen 2024-05-12 01:07:05 +08:00
parent dd3f5d0d92
commit f6241e90d5
4 changed files with 36 additions and 7 deletions

View file

@ -81,10 +81,11 @@ public final class Client {
)
return try await send(req)
}
public func single_request<U: Decodable>(_ request: String, type: U.Type = U.self) async throws -> U {
public func single_request<U: Decodable>(_ request: String, params: String? = nil, type: U.Type = U.self) async throws -> U {
let req = BurrowSimpleRequest(
id: generator.next(upperBound: UInt.max),
command: request
command: request,
params:params
)
return try await send(req)
}