From 3183e45fb2f58d5ef2c272d674e0644d9f37601c Mon Sep 17 00:00:00 2001 From: Jonathan Barrow Date: Mon, 20 Jun 2022 17:13:27 -0400 Subject: [PATCH] await Mongo connection --- src/database.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/database.js b/src/database.js index eb664aa..10b608c 100644 --- a/src/database.js +++ b/src/database.js @@ -14,6 +14,8 @@ async function connect() { accountServerDBConnection.removeAllListeners(); }); + await accountServerDBConnection.asPromise(); + PNID = accountServerDBConnection.model('PNID', PNIDSchema); module.exports.PNID = PNID;