lib/services/model_factory.js
function(instance) {
      if (!instance.id) {
        throw new Error("delete(): `id` must be defined");
      }

      return api
        .one(config.entity, instance.id)
        .delete();
    }
function(instance) {
      if (!instance.id) {
        throw new Error("delete(): `id` must be defined");
      }

      return api
        .one(config.entity, instance.id)
        .delete();
    }
function ( instance ) { if ( ! instance . id ) { throw new Error ( "delete(): `id` must be defined" ) ; } return api . one ( config . entity , instance . id ) . delete ( ) ; }
Makes an API request to delete the instance by id
@param {Model} instance
Makes an API request to delete the instance by id