lib/controllers/wirings.js
function get_wiring( req, res, next) {
		req.wiring_collection.findOne({
					user_id: req.current_user._id, 
					_id: ObjectID.createFromHexString(req.param('id')) 
			}, function(error, wiring) {
				if(error) { throw error; }
				req.wiring = wiring;
				next();
			});
	}
function get_wiring( req, res, next) {
		req.wiring_collection.findOne({
					user_id: req.current_user._id, 
					_id: ObjectID.createFromHexString(req.param('id')) 
			}, function(error, wiring) {
				if(error) { throw error; }
				req.wiring = wiring;
				next();
			});
	}
function get_wiring ( req , res , next ) { req . wiring_collection . findOne ( { user_id : req . current_user . _id , _id : ObjectID . createFromHexString ( req . param ( 'id' ) ) } , function ( error , wiring ) { if ( error ) { throw error ; } req . wiring = wiring ; next ( ) ; } ) ; }
store the wiring document into req.wiring
store the wiring document into req . wiring