lib/routes/index.js
function (req, res) {
    var options = {
      operation: 'LIST',
      res: res,
    };
    exports.list.before(req, res, options);
    vulpejs.models.list({
      model: req.params.model,
      query: req.params.query || {},
      populate: req.params.populate || '',
      sort: req.params.sort || {},
      userId: req.session['user-id'],
      callback: {
        success: function (items) {
          exports.list.after(req, res, items);
          res.json({
            items: items,
          });
        },
        error: function (error) {
          exports.response.error(options, error);
        },
      },
    });
  }
function (req, res) {
    var options = {
      operation: 'LIST',
      res: res,
    };
    exports.list.before(req, res, options);
    vulpejs.models.list({
      model: req.params.model,
      query: req.params.query || {},
      populate: req.params.populate || '',
      sort: req.params.sort || {},
      userId: req.session['user-id'],
      callback: {
        success: function (items) {
          exports.list.after(req, res, items);
          res.json({
            items: items,
          });
        },
        error: function (error) {
          exports.response.error(options, error);
        },
      },
    });
  }
function ( req , res ) { var options = { operation : 'LIST' , res : res , } ; exports . list . before ( req , res , options ) ; vulpejs . models . list ( { model : req . params . model , query : req . params . query || { } , populate : req . params . populate || '' , sort : req . params . sort || { } , userId : req . session [ 'user-id' ] , callback : { success : function ( items ) { exports . list . after ( req , res , items ) ; res . json ( { items : items , } ) ; } , error : function ( error ) { exports . response . error ( options , error ) ; } , } , } ) ; }
List from database.
@param {Object} req Request
@param {Object} res Response
List from database .