File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -35,10 +35,10 @@ open class {{ service.name | caseUcfirst }}: Service {
3535 {%~ if ' multipart/form-data' in method .consumes %}
3636 onProgress: ((UploadProgress) -> Void)? = nil
3737 {%~ endif %}
38- ){%~ if method . type != " webAuth " %} async{% endif %} throws -> {{ method | returnType(spec ) | raw }} {
38+ ) async throws -> {{ method | returnType(spec ) | raw }} {
3939 {{~ include (' swift/base/params.twig' ) }}
4040 {%~ if method .type == ' webAuth' %}
41- {{~ include (' swift/base/requests/OAuth .twig' ) }}
41+ {{~ include (' swift/base/requests/oauth .twig' ) }}
4242 {%~ elseif method .type == ' location' %}
4343 {{~ include (' swift/base/requests/location.twig' )}}
4444 {%~ else %}
Original file line number Diff line number Diff line change 11 let query = "?\(client.parametersToQueryString(params: apiParams))"
22 let url = URL(string: client.endPoint + apiPath + query)!
33 let callbackScheme = "appwrite-callback-\(client.config["project"] ?? "")"
4- let group = DispatchGroup()
54
6- group.enter()
7- WebAuthComponent.authenticate(url: url, callbackScheme: callbackScheme) { result in
8- group.leave()
5+ try await withCheckedThrowingContinuation { continuation in
6+ WebAuthComponent.authenticate(url: url, callbackScheme: callbackScheme) { result in
7+ continuation.resume(with: result)
8+ }
99 }
10- group.wait()
1110
1211 return true
You can’t perform that action at this time.
0 commit comments