diff options
Diffstat (limited to 'client')
| -rw-r--r-- | client/button.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/button.js b/client/button.js index bda2afc..4c5eafa 100644 --- a/client/button.js +++ b/client/button.js @@ -142,7 +142,10 @@ Template.dates.events({ Meteor.call('getInstagramMedia', +year, +month, function(error, results) { console.log('Instagram response', results.data); if (results.data.data.length > 0) { - Session.set('photos', results.data.data); + var photos = _.sortBy(results.data.data, function(p) { + return p.created_time; + }); + Session.set('photos', photos); $('form.dates div.error').hide(); $('form.dates button.dates').show(); } |
