comAtprotoServerUpdateEmail function

Future<XRPCResponse<EmptyData>> comAtprotoServerUpdateEmail({
  1. required String email,
  2. bool? emailAuthFactor,
  3. String? token,
  4. required ServiceContext $ctx,
  5. Map<String, String>? $headers,
  6. Map<String, String>? $unknown,
})

Update an account's email.

Implementation

Future<XRPCResponse<EmptyData>> comAtprotoServerUpdateEmail({
  required String email,
  bool? emailAuthFactor,
  String? token,
  required ServiceContext $ctx,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.comAtprotoServerUpdateEmail,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    'email': email,
    if (emailAuthFactor != null) 'emailAuthFactor': emailAuthFactor,
    if (token != null) 'token': token,
  },
);