From 5ea67c1e6f1f2bee4e5885960d394a1e1af2e49b Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Thu, 25 Mar 2021 14:33:58 +0100 Subject: [PATCH] Improve consistency --- src/fetcher/irc.js | 4 ++-- src/fetcher/twitter.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fetcher/irc.js b/src/fetcher/irc.js index 836a962..a3ef0e9 100644 --- a/src/fetcher/irc.js +++ b/src/fetcher/irc.js @@ -15,10 +15,10 @@ limitations under the License. */ const irc = require('irc-upd') -module.exports = async (serverHostname, nickQuery, nickLogin) => { +module.exports = async (nickQuery, opts) => { return new Promise((resolve, reject) => { try { - const client = new irc.Client(serverHostname, nickLogin, { + const client = new irc.Client(opts.hostname, opts.nick, { port: 6697, secure: true, channels: [], diff --git a/src/fetcher/twitter.js b/src/fetcher/twitter.js index f21ace7..448474b 100644 --- a/src/fetcher/twitter.js +++ b/src/fetcher/twitter.js @@ -16,13 +16,13 @@ limitations under the License. const bent = require('bent') const bentReq = bent('GET') -module.exports = async (tweetId, bearerToken) => { +module.exports = async (tweetId, opts) => { return bentReq( `https://api.twitter.com/1.1/statuses/show.json?id=${tweetId}&tweet_mode=extended`, null, { Accept: 'application/json', - Authorization: `Bearer ${bearerToken}`, + Authorization: `Bearer ${opts.bearerToken}`, } ) .then(async (data) => {