Fix ban process not using dbconn for delete query

master
Dessa Simpson 2020-10-18 14:54:34 -07:00
parent 68f767b28d
commit 54a7145630
1 changed files with 3 additions and 1 deletions

View File

@ -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] }))
}