deleteMemberData static method

Future<void> deleteMemberData(
  1. MemberModel member,
  2. String appId,
  3. String? subject,
  4. String? from,
  5. String? message,
  6. List<MemberCollectionInfo> memberCollectionInfo,
)

Implementation

static Future<void> deleteMemberData(
    MemberModel member,
    String appId,
    String? subject,
    String? from,
    String? message,
    List<MemberCollectionInfo> memberCollectionInfo) async {
  /*var dumpMemberData =
      */
  FirebaseFunctions.instance.httpsCallable('dumpMemberData');

  await backendRequestRepository(appId: appId)!.add(BackendRequestModel(
      documentID: newRandomKey(),
      appId: appId,
      name: member.name,
      sendTo: member.email,
      description: subject,
      authorId: member.documentID,
      processed: false,
      requestType: RequestType.destroyAccount,
      collections: _toFunctionFormat(memberCollectionInfo)));
}