public
Created

controller for main function

  • Download Gist
main.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
var Main = function () {
this.index = function (req, resp, params) {
var self = this;
var data;
geddy.model.Locations.all(function(err, locations) {
data.locations = locations;
geddy.model.Recorders.all(function(err, recorders) {
data.recorders = recorders;
self.respond({params: params, data: data}, {
format: 'html'
, template: 'app/views/locations/index'
}
});
}););
};
};
 
exports.Main = Main;

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.