/*!
 * kue - http - routes
 * Copyright (c) 2011 LearnBoost <tj@learnboost.com>
 * MIT Licensed
 */

/**
 * Module dependencies.
 */

/**
 * Serve the index page.
 */

exports.jobs = function( state ) {
  return function( req, res ) {
    req.app.queue.types(function( err, types ) {
      res.render('job/list', {
        state: state, types: types.sort(), title: req.app.get('title')
      });
    });
  };
};
