'use strict';

var expenses = require('../controllers/expenses');

module.exports = function(app) {
	app.route('/expenses')
		.get(expenses.list)
		.post(expenses.new);
		
	app.route('/expenses/:id')
		.get(expenses.read)
		.put(expenses.update)
		.delete(expenses.delete);

	app.param('id', expenses.findById);
};