Remove vestigial Trello and Blogger API keys and functions

This commit is contained in:
Quincy Larson
2016-05-18 00:04:19 -07:00
parent aebb25431d
commit 9ced160f47
4 changed files with 0 additions and 55 deletions

View File

@ -15,16 +15,11 @@ LINKEDIN_SECRET=stuff
MANDRILL_PASSWORD=stuff MANDRILL_PASSWORD=stuff
MANDRILL_USER=stuff MANDRILL_USER=stuff
TRELLO_KEY=stuff
TRELLO_SECRET=stuff
TWITTER_KEY=stuff TWITTER_KEY=stuff
TWITTER_SECRET=stuff TWITTER_SECRET=stuff
TWITTER_TOKEN=stuff TWITTER_TOKEN=stuff
TWITTER_TOKEN_SECRET=stuff TWITTER_TOKEN_SECRET=stuff
BLOGGER_KEY=stuff
SESSION_SECRET=secretstuff SESSION_SECRET=secretstuff
COOKIE_SECRET='this is a secret' COOKIE_SECRET='this is a secret'

View File

@ -8,8 +8,6 @@ module.exports = function(app) {
const router = app.loopback.Router(); const router = app.loopback.Router();
const User = app.models.User; const User = app.models.User;
router.get('/api/github', githubCalls); router.get('/api/github', githubCalls);
router.get('/api/blogger', bloggerCalls);
router.get('/api/trello', trelloCalls);
router.get('/chat', chat); router.get('/chat', chat);
router.get('/coding-bootcamp-cost-calculator', bootcampCalculator); router.get('/coding-bootcamp-cost-calculator', bootcampCalculator);
router.get('/twitch', twitch); router.get('/twitch', twitch);
@ -294,34 +292,4 @@ module.exports = function(app) {
} }
); );
} }
function trelloCalls(req, res, next) {
request(
'https://trello.com/1/boards/BA3xVpz9/cards?key=' +
secrets.trello.key,
function(err, status, trello) {
if (err) { return next(err); }
trello = (status && status.statusCode === 200) ?
(JSON.parse(trello)) :
'Can\'t connect to to Trello';
return res.end(JSON.stringify(trello));
});
}
function bloggerCalls(req, res, next) {
request(
'https://www.googleapis.com/blogger/v3/blogs/2421288658305323950/' +
'posts?key=' +
secrets.blogger.key,
function(err, status, blog) {
if (err) { return next(err); }
blog = (status && status.statusCode === 200) ?
JSON.parse(blog) :
'Can\'t connect to Blogger';
return res.end(JSON.stringify(blog));
}
);
}
}; };

View File

@ -2,15 +2,6 @@ module.exports = {
host: '127.0.0.1', host: '127.0.0.1',
sessionSecret: process.env.SESSION_SECRET, sessionSecret: process.env.SESSION_SECRET,
trello: {
key: process.env.TRELLO_KEY,
secret: process.env.TRELLO_SECRET
},
blogger: {
key: process.env.BLOGGER_KEY
},
github: { github: {
clientID: process.env.GITHUB_ID, clientID: process.env.GITHUB_ID,
clientSecret: process.env.GITHUB_SECRET clientSecret: process.env.GITHUB_SECRET

View File

@ -4,15 +4,6 @@ module.exports = {
restApiRoot: globalConfig.restApi, restApiRoot: globalConfig.restApi,
sessionSecret: process.env.SESSION_SECRET, sessionSecret: process.env.SESSION_SECRET,
trello: {
key: process.env.TRELLO_KEY,
secret: process.env.TRELLO_SECRET
},
blogger: {
key: process.env.BLOGGER_KEY
},
github: { github: {
clientID: process.env.GITHUB_ID, clientID: process.env.GITHUB_ID,
clientSecret: process.env.GITHUB_SECRET clientSecret: process.env.GITHUB_SECRET