@@ -406,7 +406,7 @@ open class Account: Service {
406
406
///
407
407
/// Add an authenticator app to be used as an MFA factor. Verify the
408
408
/// authenticator using the [verify
409
- /// authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator )
409
+ /// authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator )
410
410
/// method.
411
411
///
412
412
/// @param AppwriteEnums.AuthenticatorType type
@@ -442,8 +442,8 @@ open class Account: Service {
442
442
/// Verify Authenticator
443
443
///
444
444
/// Verify an authenticator app after adding it using the [add
445
- /// authenticator](/docs/references/cloud/client-web/account#addAuthenticator )
446
- /// method.
445
+ /// authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator )
446
+ /// method. add
447
447
///
448
448
/// @param AppwriteEnums.AuthenticatorType type
449
449
/// @param String otp
@@ -483,8 +483,8 @@ open class Account: Service {
483
483
/// Verify Authenticator
484
484
///
485
485
/// Verify an authenticator app after adding it using the [add
486
- /// authenticator](/docs/references/cloud/client-web/account#addAuthenticator )
487
- /// method.
486
+ /// authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator )
487
+ /// method. add
488
488
///
489
489
/// @param AppwriteEnums.AuthenticatorType type
490
490
/// @param String otp
@@ -512,11 +512,10 @@ open class Account: Service {
512
512
/// @throws Exception
513
513
/// @return array
514
514
///
515
- open func deleteMfaAuthenticator< T > (
515
+ open func deleteMfaAuthenticator(
516
516
type: AppwriteEnums . AuthenticatorType ,
517
- otp: String ,
518
- nestedType: T . Type
519
- ) async throws -> AppwriteModels . User < T > {
517
+ otp: String
518
+ ) async throws -> Any {
520
519
let apiPath : String = " /account/mfa/authenticators/{type} "
521
520
. replacingOccurrences ( of: " {type} " , with: type. rawValue)
522
521
@@ -528,38 +527,11 @@ open class Account: Service {
528
527
" content-type " : " application/json "
529
528
]
530
529
531
- let converter : ( Any ) -> AppwriteModels . User < T > = { response in
532
- return AppwriteModels . User. from ( map: response as! [ String : Any ] )
533
- }
534
-
535
530
return try await client. call (
536
531
method: " DELETE " ,
537
532
path: apiPath,
538
533
headers: apiHeaders,
539
- params: apiParams,
540
- converter: converter
541
- )
542
- }
543
-
544
- ///
545
- /// Delete Authenticator
546
- ///
547
- /// Delete an authenticator for a user by ID.
548
- ///
549
- /// @param AppwriteEnums.AuthenticatorType type
550
- /// @param String otp
551
- /// @throws Exception
552
- /// @return array
553
- ///
554
- open func deleteMfaAuthenticator(
555
- type: AppwriteEnums . AuthenticatorType ,
556
- otp: String
557
- ) async throws -> AppwriteModels . User < [ String : AnyCodable ] > {
558
- return try await deleteMfaAuthenticator (
559
- type: type,
560
- otp: otp,
561
- nestedType: [ String : AnyCodable ] . self
562
- )
534
+ params: apiParams )
563
535
}
564
536
565
537
///
0 commit comments