Skip to content
Snippets Groups Projects
Commit 6f7cf99f authored by syuilo's avatar syuilo
Browse files

[Server] Fix bug

parent 728bbb65
No related branches found
No related tags found
No related merge requests found
......@@ -3,17 +3,19 @@ import * as express from 'express';
const Twitter = require('twitter');
import config from '../../../conf';
const client = new Twitter({
consumer_key: config.twitter.consumer_key,
consumer_secret: config.twitter.consumer_secret
});
module.exports = (req: express.Request, res: express.Response) => {
client.post('oauth/request_token', {
oauth_callback: config.url + '/tw/cb'
}, (x, y, z) => {
console.log(x);
console.log(y);
console.log(z);
});
if (config.twitter) {
const client = new Twitter({
consumer_key: config.twitter.consumer_key,
consumer_secret: config.twitter.consumer_secret
});
client.post('oauth/request_token', {
oauth_callback: config.url + '/tw/cb'
}, (x, y, z) => {
console.log(x);
console.log(y);
console.log(z);
});
}
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment