File tree 2 files changed +6
-7
lines changed
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 {
35
35
{%~ if ' multipart/form-data' in method .consumes %}
36
36
onProgress: ((UploadProgress) -> Void)? = nil
37
37
{%~ endif %}
38
- ){%~ if method . type != " webAuth " %} async{% endif %} throws -> {{ method | returnType(spec ) | raw }} {
38
+ ) async throws -> {{ method | returnType(spec ) | raw }} {
39
39
{{~ include (' swift/base/params.twig' ) }}
40
40
{%~ if method .type == ' webAuth' %}
41
- {{~ include (' swift/base/requests/OAuth .twig' ) }}
41
+ {{~ include (' swift/base/requests/oauth .twig' ) }}
42
42
{%~ elseif method .type == ' location' %}
43
43
{{~ include (' swift/base/requests/location.twig' )}}
44
44
{%~ else %}
Original file line number Diff line number Diff line change 1
1
let query = "?\(client.parametersToQueryString(params: apiParams))"
2
2
let url = URL(string: client.endPoint + apiPath + query)!
3
3
let callbackScheme = "appwrite-callback-\(client.config["project"] ?? "")"
4
- let group = DispatchGroup()
5
4
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
+ }
9
9
}
10
- group.wait()
11
10
12
11
return true
You can’t perform that action at this time.
0 commit comments