lib/mock/query-collection.js
function sendResponse (err, resources) {
    // Extract the "data" of each Resource
    resources = _.map(resources, "data");

    // Use the current date/time as the "last-modified" header
    res.swagger.lastModified = new Date();

    // Set the response body (unless it's already been set by other middleware)
    if (err || res.body) {
      next(err);
    }
    else if (!res.swagger.isCollection) {
      // Response body is a single value, so only return the first item in the collection
      res.body = _.first(resources);
      next();
    }
    else {
      // Response body is the resource that was created/update/deleted
      res.body = resources;
      next();
    }
  }
function sendResponse (err, resources) {
    // Extract the "data" of each Resource
    resources = _.map(resources, "data");

    // Use the current date/time as the "last-modified" header
    res.swagger.lastModified = new Date();

    // Set the response body (unless it's already been set by other middleware)
    if (err || res.body) {
      next(err);
    }
    else if (!res.swagger.isCollection) {
      // Response body is a single value, so only return the first item in the collection
      res.body = _.first(resources);
      next();
    }
    else {
      // Response body is the resource that was created/update/deleted
      res.body = resources;
      next();
    }
  }
function sendResponse ( err , resources ) { // Extract the "data" of each Resource resources = _ . map ( resources , "data" ) ; // Use the current date/time as the "last-modified" header res . swagger . lastModified = new Date ( ) ; // Set the response body (unless it's already been set by other middleware) if ( err || res . body ) { next ( err ) ; } else if ( ! res . swagger . isCollection ) { // Response body is a single value, so only return the first item in the collection res . body = _ . first ( resources ) ; next ( ) ; } else { // Response body is the resource that was created/update/deleted res . body = resources ; next ( ) ; } }
Responds with the deleted resources
Responds with the deleted resources