diff --git a/js/app.js b/js/app.js index e6c5402..1f087c9 100755 --- a/js/app.js +++ b/js/app.js @@ -25,6 +25,7 @@ var showtimes = [ ]; var restUrl = 'http://localhost:8888'; +var today = new Date(); App.Router.map(function() { @@ -52,7 +53,11 @@ App.TheatersRoute = Ember.Route.extend({ App.ShowtimesRoute = Ember.Route.extend({ model: function(params) { var theatersObjs = this.modelFor('theaters'); - return $.getJSON(restUrl+'/showtimes/'+theatersObjs[0].group+'/'+params.code+'/'); + var url = [ + restUrl, '/showtimes/', theatersObjs[0].group, + '/', params.code, '/?d=', moment(today).format('YYYY-MM-DD') + ]; + return $.getJSON(url.join('')); } });