Remove vestigial Trello and Blogger API keys and functions
This commit is contained in:
@ -15,16 +15,11 @@ LINKEDIN_SECRET=stuff
|
||||
MANDRILL_PASSWORD=stuff
|
||||
MANDRILL_USER=stuff
|
||||
|
||||
TRELLO_KEY=stuff
|
||||
TRELLO_SECRET=stuff
|
||||
|
||||
TWITTER_KEY=stuff
|
||||
TWITTER_SECRET=stuff
|
||||
TWITTER_TOKEN=stuff
|
||||
TWITTER_TOKEN_SECRET=stuff
|
||||
|
||||
BLOGGER_KEY=stuff
|
||||
|
||||
SESSION_SECRET=secretstuff
|
||||
COOKIE_SECRET='this is a secret'
|
||||
|
||||
|
@ -8,8 +8,6 @@ module.exports = function(app) {
|
||||
const router = app.loopback.Router();
|
||||
const User = app.models.User;
|
||||
router.get('/api/github', githubCalls);
|
||||
router.get('/api/blogger', bloggerCalls);
|
||||
router.get('/api/trello', trelloCalls);
|
||||
router.get('/chat', chat);
|
||||
router.get('/coding-bootcamp-cost-calculator', bootcampCalculator);
|
||||
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));
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -2,15 +2,6 @@ module.exports = {
|
||||
host: '127.0.0.1',
|
||||
sessionSecret: process.env.SESSION_SECRET,
|
||||
|
||||
trello: {
|
||||
key: process.env.TRELLO_KEY,
|
||||
secret: process.env.TRELLO_SECRET
|
||||
},
|
||||
|
||||
blogger: {
|
||||
key: process.env.BLOGGER_KEY
|
||||
},
|
||||
|
||||
github: {
|
||||
clientID: process.env.GITHUB_ID,
|
||||
clientSecret: process.env.GITHUB_SECRET
|
||||
|
@ -4,15 +4,6 @@ module.exports = {
|
||||
restApiRoot: globalConfig.restApi,
|
||||
sessionSecret: process.env.SESSION_SECRET,
|
||||
|
||||
trello: {
|
||||
key: process.env.TRELLO_KEY,
|
||||
secret: process.env.TRELLO_SECRET
|
||||
},
|
||||
|
||||
blogger: {
|
||||
key: process.env.BLOGGER_KEY
|
||||
},
|
||||
|
||||
github: {
|
||||
clientID: process.env.GITHUB_ID,
|
||||
clientSecret: process.env.GITHUB_SECRET
|
||||
|
Reference in New Issue
Block a user