getDatabaseTables method

Future<Response> getDatabaseTables(
  1. String databaseName
)

Implementation

Future<http.Response> getDatabaseTables(String databaseName) async {
  // Remove spaces from the databaseName
  final DatabaseNameFix = databaseName.replaceAll(' ', '');

  final url = 'https://apiservices.haiva.ai/v1/admin/$orgId/$workspaceId/$DatabaseNameFix/get-database-tables';

  print("url = $url");

  try {
    final response = await http.get(Uri.parse(url));
    return response;
  } catch (e) {
    throw Exception('Failed to get database tables: ${e.toString()}');
  }
}