Fix typescript miss use

This commit is contained in:
nymkappa 2022-01-20 23:31:32 +09:00
parent a1a2e9363f
commit 87175869dd
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04

View File

@ -67,9 +67,9 @@ class PoolsParser {
// Get existing pools from the db
const connection = await DB.pool.getConnection();
let existingPools: any[] = [];
let existingPools;
try {
existingPools = await connection.query<any>({ sql: 'SELECT * FROM pools;', timeout: 120000 });
[existingPools] = await connection.query<any>({ sql: 'SELECT * FROM pools;', timeout: 120000 });
} catch (e) {
logger.err('Unable to get existing pools from the database, skipping pools.json import');
connection.release();