From ac953b0bb5384ab1d852047d5699672681a78f34 Mon Sep 17 00:00:00 2001 From: Dessa Simpson Date: Sun, 27 Feb 2022 17:16:48 -0700 Subject: [PATCH] Uncomment debug lines --- src/cronjobs/processBans.ts | 8 ++++---- src/cronjobs/processSubscriptions.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cronjobs/processBans.ts b/src/cronjobs/processBans.ts index 2316612..a47a2fa 100644 --- a/src/cronjobs/processBans.ts +++ b/src/cronjobs/processBans.ts @@ -9,8 +9,8 @@ export async function processBans(streamer: twitch.StreamerUserIdTokenPair) { await dbconn.query("DELETE FROM bans"); var response = await twitch.streamerApiRequest(streamer, `/moderation/banned?broadcaster_id=${streamer.userid}&first=100`); - //log(LogLevel.DEBUG,"Ban API response:") - //log(LogLevel.DEBUG,JSON.stringify(response,null,2)); + log(LogLevel.DEBUG,"Ban API response:") + log(LogLevel.DEBUG,JSON.stringify(response,null,2)); while (true) { var insertBanQuery = "INSERT INTO bans (userid) VALUES "; var banRow = 0; // Used for $1, $2, etc. in parameterized query @@ -37,8 +37,8 @@ export async function processBans(streamer: twitch.StreamerUserIdTokenPair) { var oldFirstUserid = response.data[0].user_id; response = await twitch.streamerApiRequest(streamer, `/moderation/banned?broadcaster_id=${streamer.userid}&after=${response.pagination.cursor}&first=100`); - //log(LogLevel.DEBUG,"Ban API response:"); - //log(LogLevel.DEBUG,JSON.stringify(response,null,2)); + log(LogLevel.DEBUG,"Ban API response:"); + log(LogLevel.DEBUG,JSON.stringify(response,null,2)); // Work around broken api endpoint giving a cursor referring to the // current page, causing an infinite loop if (oldFirstUserid == response.data[0].user_id) break; diff --git a/src/cronjobs/processSubscriptions.ts b/src/cronjobs/processSubscriptions.ts index 3e250df..980e69b 100644 --- a/src/cronjobs/processSubscriptions.ts +++ b/src/cronjobs/processSubscriptions.ts @@ -9,8 +9,8 @@ export async function processSubscriptions(streamer: twitch.StreamerUserIdTokenP await dbconn.query("DELETE FROM subscriptions"); var response = await twitch.streamerApiRequest(streamer, `/subscriptions?broadcaster_id=${streamer.userid}&first=100`); - //log(LogLevel.DEBUG,"Subscriptions API response:") - //log(LogLevel.DEBUG,JSON.stringify(response,null,2)); + log(LogLevel.DEBUG,"Subscriptions API response:") + log(LogLevel.DEBUG,JSON.stringify(response,null,2)); while (true) { var insertSubscriptionQuery = "INSERT INTO subscriptions (userid) VALUES "; var subscriptionRow = 0; // Used for $1, $2, etc. in parameterized query @@ -36,8 +36,8 @@ export async function processSubscriptions(streamer: twitch.StreamerUserIdTokenP response = await twitch.streamerApiRequest(streamer, `/subscriptions?broadcaster_id=${streamer.userid}&after=${response.pagination.cursor}&first=100`); if (oldFirstUserid == response.data[0].user_id) break; - //log(LogLevel.DEBUG,"Subscription API response:"); - //log(LogLevel.DEBUG,JSON.stringify(response,null,2)); + log(LogLevel.DEBUG,"Subscription API response:"); + log(LogLevel.DEBUG,JSON.stringify(response,null,2)); } else { break; }