Future remove(id, [Map params])

Removes the given resource.

Source

Future remove(id, [Map params]) async {
  int desiredId = int.parse(id.toString());
  if (items.containsKey(desiredId)) {
    T item = items[desiredId];
    items[desiredId] = null;
    return _makeJson(desiredId, item);
  } else throw new AngelHttpException.NotFound();
}