Update server.js
Browse files
server.js
CHANGED
|
@@ -27,7 +27,7 @@ async function connectDB() {
|
|
| 27 |
// Initialize collections
|
| 28 |
const collections = ['users', 'bots', 'sessions'];
|
| 29 |
for (const colName of collections) {
|
| 30 |
-
if (!(await db.listCollections({ name: colName }).hasNext()) {
|
| 31 |
await db.createCollection(colName);
|
| 32 |
console.log(`Created collection: ${colName}`);
|
| 33 |
}
|
|
|
|
| 27 |
// Initialize collections
|
| 28 |
const collections = ['users', 'bots', 'sessions'];
|
| 29 |
for (const colName of collections) {
|
| 30 |
+
if (!(await db.listCollections({ name: colName }).hasNext())) {
|
| 31 |
await db.createCollection(colName);
|
| 32 |
console.log(`Created collection: ${colName}`);
|
| 33 |
}
|