From 54a7145630be316b5b5ee403c598c6225baa13f5 Mon Sep 17 00:00:00 2001 From: Dessa Simpson Date: Sun, 18 Oct 2020 14:54:34 -0700 Subject: [PATCH] Fix ban process not using dbconn for delete query --- src/app.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app.ts b/src/app.ts index a2e9209..7ce03de 100644 --- a/src/app.ts +++ b/src/app.ts @@ -310,7 +310,9 @@ async function processBannedUsers() { var dbconn = await db.connect(); try { await dbconn.query('BEGIN'); - db.query("DELETE FROM bans"); + dbconn.query("DELETE FROM bans"); + log(LogLevel.DEBUG,"Ban list:") + log(LogLevel.DEBUG,JSON.stringify(response.data,null,2)); for (var ban of response.data) { if (ban.expires_at == '') dbconn.query(Object.assign(queries.insertBan,{ values: [ban.user_id] })) }