deleteUser method

Future deleteUser(
  1. int userID
)

Deletes the user with the given userID from the API. Returns true if the API call is successful.

Implementation

Future deleteUser(int userID) async {
  final response = await callApi(endpoint: 'users/$userID', method: 'delete');

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