From d0e5711f65ab2fba48196079f928cd291b9dbca9 Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Sun, 16 Jul 2023 21:24:54 -0600 Subject: [PATCH] fix: set _ready to true --- backend/sql/mysql.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/sql/mysql.ts b/backend/sql/mysql.ts index 71a6e9f..2379b0d 100644 --- a/backend/sql/mysql.ts +++ b/backend/sql/mysql.ts @@ -85,7 +85,10 @@ export class MySql { // Hopefully we are ready if (tablesExist.files && tablesExist.users) - log.info('MySQL', 'Tables exist, ready').callback(resolve(void 0)); + log.info('MySQL', 'Tables exist, ready').callback(() => { + MySql._ready = true; + resolve(void 0) + }); else throw new Error('Table(s) missing!'); } } catch (err) {