updateRecovery static method

Future<Map<String, dynamic>> updateRecovery({
  1. required String userId,
  2. required String secret,
  3. required String password,
})

Implementation

static Future<Map<String, dynamic>> updateRecovery({
  required String userId,
  required String secret,
  required String password,
}) async {
  Account account = Account(_client);

  try {
    final models.Token token = await account.updateRecovery(
      userId: userId,
      secret: secret,
      password: password,
    );

    _token = token;

    return token.toMap();
  } on AppwriteException catch (e) {
    return {
      'error': true,
      'type': e.type,
      'message': e.message,
      'code': e.code,
    };
  }
}