deleteSnapshot static method

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

Implementation

static Future<Map<String, Object?>> deleteSnapshot(
  final Client cloudApiClient, {
  required final String projectId,
  required final String snapshotId,
}) async {
  try {
    await cloudApiClient.database.deleteSnapshot(
      cloudCapsuleId: projectId,
      snapshotId: snapshotId,
    );
  } on Exception catch (e, s) {
    throw FailureException.nested(e, s, 'Failed to delete snapshot');
  }

  return {'snapshotId': snapshotId};
}