Skip to content

Commit 596b43e

Browse files
committed
chore: update SDKs to new RC version
1 parent 260f5a5 commit 596b43e

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Add the package to your `Package.swift` dependencies:
3131

3232
```swift
3333
dependencies: [
34-
.package(url: "[email protected]:appwrite/sdk-for-apple.git", from: "7.0.0-rc.1"),
34+
.package(url: "[email protected]:appwrite/sdk-for-apple.git", from: "7.0.0-rc.2"),
3535
],
3636
```
3737

Sources/Appwrite/Client.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ open class Client {
2323
"x-sdk-name": "Apple",
2424
"x-sdk-platform": "client",
2525
"x-sdk-language": "apple",
26-
"x-sdk-version": "7.0.0-rc.1",
26+
"x-sdk-version": "7.0.0-rc.2",
2727
"x-appwrite-response-format": "1.6.0"
2828
]
2929

Sources/Appwrite/Services/Functions.swift

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,12 @@ open class Functions: Service {
185185
path: String? = nil,
186186
method: AppwriteEnums.ExecutionMethod? = nil,
187187
headers: Any? = nil,
188-
scheduledAt: String? = nil,
189-
onProgress: ((UploadProgress) -> Void)? = nil
188+
scheduledAt: String? = nil
190189
) async throws -> AppwriteModels.Execution {
191190
let apiPath: String = "/functions/{functionId}/executions"
192191
.replacingOccurrences(of: "{functionId}", with: functionId)
193192

194-
var apiParams: [String: Any?] = [
193+
let apiParams: [String: Any?] = [
195194
"body": body,
196195
"async": async,
197196
"path": path,
@@ -200,23 +199,20 @@ open class Functions: Service {
200199
"scheduledAt": scheduledAt
201200
]
202201

203-
var apiHeaders: [String: String] = [
204-
"content-type": "multipart/form-data"
202+
let apiHeaders: [String: String] = [
203+
"content-type": "application/json"
205204
]
206205

207206
let converter: (Any) -> AppwriteModels.Execution = { response in
208207
return AppwriteModels.Execution.from(map: response as! [String: Any])
209208
}
210209

211-
let idParamName: String? = nil
212-
return try await client.chunkedUpload(
210+
return try await client.call(
211+
method: "POST",
213212
path: apiPath,
214-
headers: &apiHeaders,
215-
params: &apiParams,
216-
paramName: paramName,
217-
idParamName: idParamName,
218-
converter: converter,
219-
onProgress: onProgress
213+
headers: apiHeaders,
214+
params: apiParams,
215+
converter: converter
220216
)
221217
}
222218

0 commit comments

Comments
 (0)