mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 12:13:48 +01:00
[Server] Fix bug
This commit is contained in:
parent
dd6cb158a2
commit
464bbecede
@ -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);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user