remove extra async and extra utils

This commit is contained in:
Michael C
2021-09-22 23:34:46 -04:00
parent 4e50f0ab4b
commit 28d637f620
21 changed files with 52 additions and 75 deletions

View File

@@ -10,6 +10,7 @@ export class Mysql implements IDatabase {
constructor(private config: unknown) {
}
// eslint-disable-next-line require-await
async init(): Promise<void> {
this.connection = new MysqlInterface(this.config);
}

View File

@@ -12,6 +12,7 @@ export class Sqlite implements IDatabase {
{
}
// eslint-disable-next-line require-await
async prepare(type: QueryType, query: string, params: any[] = []): Promise<any[]> {
// Logger.debug(`prepare (sqlite): type: ${type}, query: ${query}, params: ${params}`);
const preparedQuery = this.db.prepare(query);
@@ -30,6 +31,7 @@ export class Sqlite implements IDatabase {
}
}
// eslint-disable-next-line require-await
async init(): Promise<void> {
// Make dirs if required
if (!fs.existsSync(path.join(this.config.dbPath, "../"))) {