remove github events from feed

This commit is contained in:
Riku Rouvila
2017-10-26 15:06:37 +01:00
parent 07b695612f
commit 9730b88e62
2 changed files with 1 additions and 19 deletions

View File

@@ -12,8 +12,7 @@ module.exports = function (app) {
*/
app.get('/feeds', cache('10 minutes'), function(req, res, next) {
Promise.props({
twitter: twitter.getTweets(40),
github: github.getEvents(40)
twitter: twitter.getTweets(40)
}).then(function(data) {
res.status(200).send(data);
}, function(err) {

View File

@@ -19,23 +19,6 @@ function getNextPage(headers) {
}
var githubService = {
/**
* Fetch five latest events from GitHub organization
*/
getEvents: function(amount) {
return new Promise(function(resolve, reject) {
request
.get('https://api.github.com/orgs/koodiklinikka/events?per_page=' + amount)
.set('Authorization', 'token ' + config.github.token)
.end(function(error, response){
if(error) {
reject(error);
}
resolve(response.body);
});
});
},
/**
* Fetch all members of the GitHub organization
*/