fix/database not awaited
This commit is contained in:
1 file changed
+2
-2
@@ -36,8 +36,8 @@ let users;
|
|||||||
let assets;
|
let assets;
|
||||||
let plans;
|
let plans;
|
||||||
async function initDatabase() {
|
async function initDatabase() {
|
||||||
const db = connectMongo(mongoURI, database);
|
const db = await connectMongo(mongoURI, database);
|
||||||
|
|
||||||
// For any collection, init here
|
// For any collection, init here
|
||||||
users = await getCollection(db, "users");
|
users = await getCollection(db, "users");
|
||||||
assets = await getCollection(db, "assets");
|
assets = await getCollection(db, "assets");
|
||||||
|
|||||||
Reference in new issue
Block a user