var restify = require('express-restify-mongoose');
var Artist = require('../api/models/artist');
var Info = require('../api/models/info');
var News = require('../api/models/news');
var Event = require('../api/models/event');
var Location = require('../api/models/location');
var Festival = require('../api/models/festival');
var Localise = require('../lib/localise');

module.exports = function(app, apiVersion) {
  restify.defaults({
    outputFn: Localise.localiseApiCallResult,
    version: apiVersion,
    private: ['__v']
  });

  restify.serve(app, Artist);
  restify.serve(app, Info, {
    plural: false,
    contextFilter: function(model, req, cb) {
      // Sort by creation timestamp (included in Mongo's _id field)
      cb(model.find().sort('_id'));
    }
  });
  restify.serve(app, News);
  restify.serve(app, Event);
  restify.serve(app, Location);
  restify.serve(app, Festival, { plural: false });
};

@@ -362,16 +362,687 @@
 ise');%0A%0A
+function shiftTimes(item) %7B%0A  onlyAttributes = %5B'start_time', 'end_time'%5D;%0A%0A  Object.keys(item)%0A    .filter(function(key) %7B%0A      return onlyAttributes.indexOf(key) %3E -1;%0A    %7D)%0A    .forEach(function(key) %7B%0A      // add one hour for time attributes%0A      var shiftedTimestamp =%0A        new Date(item%5Bkey%5D).getTime() +%0A        60 * 60 * 1000/*ms*/;%0A      item%5Bkey%5D = new Date(shiftedTimestamp).toString();%0A    %7D);%0A%7D%0A%0Afunction transformItem(item) %7B%0A  shiftTimes(item);%0A%7D%0A%0Afunction transformResult(result) %7B%0A  if (result instanceof Array) %7B%0A    result.forEach(function(item) %7B%0A      transformItem(item);%0A    %7D);%0A  %7D else %7B%0A    transformItem(result);%0A  %7D%0A  return result;%0A%7D%0A%0A
 module.e
@@ -1492,16 +1492,178 @@
 p, Event
+, %7B%0A    outputFn: function(req, res) %7B%0A      res%0A        .status(req.erm.statusCode)%0A        .json(%0A          transformResult(req.erm.result)%0A        );%0A    %7D%0A  %7D
 );%0A  res

Add 1 hour to datetimes for start_time and end_time in the events API result