const getManyComplete = require('./getManyComplete');

module.exports = (range, callback) => {
  // Get latest entries with their attachments and urls completed.
  //
  // Parameters:
  //   range
  //     skip
  //     limit
  //   callback
  //     function (err, entries)
  //
  return getManyComplete({
    deleted: false,
  }, {
    skip: range.skip,
    limit: range.limit,
    withLocations: true,
  }, callback);
};

const getManyComplete = require('./getManyComplete');

module.exports = (range, callback) => {
  // Get latest entries with their attachments and urls completed.
  //
  // Parameters:
  //   range
  //     skip
  //     limit
  //   callback
  //     function (err, entries)
  //
  return getManyComplete({
    deleted: false,
  }, {
    skip: range.skip,
    limit: range.limit,
    withLocations: true,
    sort: {
      activeAt: -1,
    },
  }, callback);
};

Sort latest entries by activeAt
Sort latest entries by activeAt
