lib/models/index.js
function (query, page, callback) {
  var History = exports.get('History');
  History.paginate(query, {
    page: page,
    limit: vulpejs.app.pagination.history,
  }, function (error, items, pageCount, itemCount) {
    if (error) {
      vulpejs.log.error('HISTORY', error);
    } else {
      callback(error, {
        items: items,
        pageCount: pageCount,
        itemCount: itemCount,
      });
    }
  }, {
    sortBy: {
      version: -1,
    },
  });
}
function (query, page, callback) {
  var History = exports.get('History');
  History.paginate(query, {
    page: page,
    limit: vulpejs.app.pagination.history,
  }, function (error, items, pageCount, itemCount) {
    if (error) {
      vulpejs.log.error('HISTORY', error);
    } else {
      callback(error, {
        items: items,
        pageCount: pageCount,
        itemCount: itemCount,
      });
    }
  }, {
    sortBy: {
      version: -1,
    },
  });
}
function ( query , page , callback ) { var History = exports . get ( 'History' ) ; History . paginate ( query , { page : page , limit : vulpejs . app . pagination . history , } , function ( error , items , pageCount , itemCount ) { if ( error ) { vulpejs . log . error ( 'HISTORY' , error ) ; } else { callback ( error , { items : items , pageCount : pageCount , itemCount : itemCount , } ) ; } } , { sortBy : { version : - 1 , } , } ) ; }
Find and page histories of object in database.
@param {Object}   query   Query
@param {Number}   page     Page
@param {Function} callback Callback function
Find and page histories of object in database .