createDatabase static method

Future<Map<String, Object?>> createDatabase(
  1. Client cloudApiClient, {
  2. required String projectId,
})

Requests database creation for an existing project.

Implementation

static Future<Map<String, Object?>> createDatabase(
  Client cloudApiClient, {
  required String projectId,
}) async {
  try {
    await cloudApiClient.database.enableDatabase(cloudCapsuleId: projectId);
  } on Exception catch (e, s) {
    throw FailureException.nested(
      e,
      s,
      'Request to create a database for the new project failed',
    );
  }

  return {'projectId': projectId};
}