Permalink
Browse files

don't display tweets and assets

  • Loading branch information...
1 parent 58b4595 commit efc650bed40a34e329e10662f4021eecdc385530 @avalanche123 avalanche123 committed Aug 28, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 server.js
View
@@ -231,7 +231,9 @@ app.get('/events.json', function(req, res){
}
event.set("tweetsCount", event.tweets.length);
+ event.set("assetsCount", event.assets.length);
event.tweets = [];
+ event.assets = [];
eventList.push(event);
});
@@ -259,7 +261,9 @@ app.get('/events/my.json', andRequireUser, function(req, res) {
return aTime > bTime ? -1 : 1
}).forEach(function(event, i) {
event.set("tweetsCount", event.tweets.length);
+ event.set("assetsCount", event.assets.length);
event.tweets = [];
+ event.assets = [];
eventList.push(event);
});
@@ -287,7 +291,9 @@ app.get('/events/current.json', function(req, res){
return aTime > bTime ? -1 : 1
}).forEach(function(event, i) {
event.set("tweetsCount", event.tweets.length);
+ event.set("assetsCount", event.assets.length);
event.tweets = [];
+ event.assets = [];
eventList.push(event);
});
@@ -315,7 +321,9 @@ app.get('/events/upcoming.json', function(req, res){
return aTime > bTime ? -1 : 1
}).forEach(function(event, i) {
event.set("tweetsCount", event.tweets.length);
+ event.set("assetsCount", event.assets.length);
event.tweets = [];
+ event.assets = [];
eventList.push(event);
});
@@ -333,7 +341,9 @@ app.get('/events/:id.json', function(req, res) {
}
event.set("tweetsCount", event.tweets.length);
+ event.set("assetsCount", event.assets.length);
event.tweets = [];
+ event.assets = [];
res.json(event, 200);
});

0 comments on commit efc650b

Please sign in to comment.