From 9730b88e6261158dc32c46bcc9dcf2c6124ba285 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Thu, 26 Oct 2017 15:06:37 +0100 Subject: [PATCH] remove github events from feed --- routes/feeds.js | 3 +-- services/github.js | 17 ----------------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/routes/feeds.js b/routes/feeds.js index bf09e4b..c569a0d 100644 --- a/routes/feeds.js +++ b/routes/feeds.js @@ -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) { diff --git a/services/github.js b/services/github.js index e36f218..8b8826f 100644 --- a/services/github.js +++ b/services/github.js @@ -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 */