deleteConsultation method

Future<bool> deleteConsultation(
  1. int consultationID
)

Deletes the consultation with the given consultationID from the API. Returns true if the API call is successful.

Implementation

Future<bool> deleteConsultation(int consultationID) async {
  final response = await callApi(
      endpoint: 'consultations/$consultationID', method: 'delete');

  if (response.statusCode == 204) {
    return true;
  } else {
    throw Exception(response);
  }
}