|
1 | 1 | import AsyncHTTPClient |
2 | 2 | import Foundation |
3 | 3 | import NIO |
| 4 | +import JSONCodable |
4 | 5 | import AppwriteModels |
5 | 6 |
|
6 | 7 | /// The Account service allows you to authenticate and manage a user account. |
@@ -130,7 +131,7 @@ open class Account: Service { |
130 | 131 | userId: userId, |
131 | 132 | email: email, |
132 | 133 | password: password, |
133 | | - name: name |
| 134 | + name: name, |
134 | 135 | nestedType: [String: AnyCodable].self |
135 | 136 | ) |
136 | 137 | } |
@@ -204,7 +205,7 @@ open class Account: Service { |
204 | 205 | ) async throws -> AppwriteModels.Account<[String: AnyCodable]> { |
205 | 206 | return try await updateEmail( |
206 | 207 | email: email, |
207 | | - password: password |
| 208 | + password: password, |
208 | 209 | nestedType: [String: AnyCodable].self |
209 | 210 | ) |
210 | 211 | } |
@@ -329,7 +330,7 @@ open class Account: Service { |
329 | 330 | name: String |
330 | 331 | ) async throws -> AppwriteModels.Account<[String: AnyCodable]> { |
331 | 332 | return try await updateName( |
332 | | - name: name |
| 333 | + name: name, |
333 | 334 | nestedType: [String: AnyCodable].self |
334 | 335 | ) |
335 | 336 | } |
@@ -393,7 +394,7 @@ open class Account: Service { |
393 | 394 | ) async throws -> AppwriteModels.Account<[String: AnyCodable]> { |
394 | 395 | return try await updatePassword( |
395 | 396 | password: password, |
396 | | - oldPassword: oldPassword |
| 397 | + oldPassword: oldPassword, |
397 | 398 | nestedType: [String: AnyCodable].self |
398 | 399 | ) |
399 | 400 | } |
@@ -461,7 +462,7 @@ open class Account: Service { |
461 | 462 | ) async throws -> AppwriteModels.Account<[String: AnyCodable]> { |
462 | 463 | return try await updatePhone( |
463 | 464 | phone: phone, |
464 | | - password: password |
| 465 | + password: password, |
465 | 466 | nestedType: [String: AnyCodable].self |
466 | 467 | ) |
467 | 468 | } |
@@ -525,7 +526,7 @@ open class Account: Service { |
525 | 526 | /// @return array |
526 | 527 | /// |
527 | 528 | open func updatePrefs<T>( |
528 | | - prefs: T, |
| 529 | + prefs: Any, |
529 | 530 | nestedType: T.Type |
530 | 531 | ) async throws -> AppwriteModels.Account<T> { |
531 | 532 | let path: String = "/account/prefs" |
@@ -566,7 +567,7 @@ open class Account: Service { |
566 | 567 | prefs: Any |
567 | 568 | ) async throws -> AppwriteModels.Account<[String: AnyCodable]> { |
568 | 569 | return try await updatePrefs( |
569 | | - prefs: prefs |
| 570 | + prefs: prefs, |
570 | 571 | nestedType: [String: AnyCodable].self |
571 | 572 | ) |
572 | 573 | } |
|
0 commit comments