old_contents: 'use strict';
  
  var moment   = require('moment');
  var restify  = require('restify');
  var mongoose = require('mongoose');
  
  var Match  = mongoose.model('match');
  var server = restify.createServer();
  
  server.get('/matches/:year', function(req, res) {
  
  });
  
  server.get('/matches/:year/:week', function(req, res) {
  	var year        = req.params.year;
  	var week        = req.params.week;
  	var endOfWeek   = moment().year(year).week(week).endOf('week');
  	var startOfWeek = moment().year(year).week(week).startOf('week');
  
  	var query = {
  		'startedAt': {
  			'$gte': startOfWeek.toDate(),
  			'$lte': endOfWeek.toDate(),
  		}
  	}
  
  	Match.find(query, function(err, matches) {
  		if(err) {
  			return res.send(500, err);
  		}
  		return res.json(200, matches);
  	});
  });
  
  module.exports = server;
  
new_contents: 'use strict';
  
  var moment   = require('moment');
  var restify  = require('restify');
  var mongoose = require('mongoose');
  
  var Match  = mongoose.model('match');
  var server = restify.createServer();
  
  server.get('/matches/:year/:week', function(req, res) {
  	var year        = req.params.year;
  	var week        = req.params.week;
  	var endOfWeek   = moment().year(year).week(week).endOf('week');
  	var startOfWeek = moment().year(year).week(week).startOf('week');
  
  	var query = {
  		'startedAt': {
  			'$gte': startOfWeek.toDate(),
  			'$lte': endOfWeek.toDate(),
  		}
  	}
  
  	Match.find(query, function(err, matches) {
  		if(err) {
  			return res.send(500, err);
  		}
  		return res.json(200, matches);
  	});
  });
  
  module.exports = server;
  
subject: Remove unused '/matches/:year' API for now