payservedb 4.2.3 → 4.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -9,7 +9,7 @@ const connections = {};
|
|
|
9
9
|
// Utility function to connect to MongoDB
|
|
10
10
|
async function connectToMongoDB(dbName, secured, username, password, url, port) {
|
|
11
11
|
try {
|
|
12
|
-
if (secured ===
|
|
12
|
+
if (secured === false) {
|
|
13
13
|
const url_ = url + ":" + port;
|
|
14
14
|
const connectionString = `mongodb://${url_}/${dbName}`;
|
|
15
15
|
await mongoose.connect(connectionString, {
|