mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
chore: upgrade mongodb (#56829)
This commit is contained in:
@@ -22,7 +22,7 @@ const examFilenames = [
|
||||
'example-certification-exam.yml'
|
||||
];
|
||||
|
||||
const client = new MongoClient(MONGOHQ_URL, { useUnifiedTopology: true });
|
||||
const client = new MongoClient(MONGOHQ_URL);
|
||||
|
||||
function handleError(err, client) {
|
||||
if (err) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"joi": "17.12.2",
|
||||
"joi-objectid": "3.0.1",
|
||||
"js-yaml": "4.1.0",
|
||||
"mongodb": "5.9.2",
|
||||
"mongodb": "6.10.0",
|
||||
"nanoid": "4.0.2"
|
||||
},
|
||||
"type": "module"
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
"devDependencies": {
|
||||
"debug": "4.3.4",
|
||||
"dotenv": "16.4.5",
|
||||
"mongodb": "5.9.2"
|
||||
"mongodb": "6.10.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ const trophyChallenges = [
|
||||
}
|
||||
});
|
||||
|
||||
const client = new MongoClient(MONGOHQ_URL, { useNewUrlParser: true });
|
||||
const client = new MongoClient(MONGOHQ_URL);
|
||||
|
||||
const db = client.db('freecodecamp');
|
||||
const user = db.collection('user');
|
||||
|
||||
@@ -42,7 +42,7 @@ const certifiedUserAccount = {
|
||||
msUsername: 'certifieduser'
|
||||
};
|
||||
|
||||
const client = new MongoClient(MONGOHQ_URL, { useNewUrlParser: true });
|
||||
const client = new MongoClient(MONGOHQ_URL);
|
||||
|
||||
const run = async () => {
|
||||
await client.db('admin').command({ ping: 1 });
|
||||
|
||||
@@ -74,7 +74,7 @@ const certifiedUserSurvey = {
|
||||
userId: new ObjectId('5fa2db00a25c1c1fa49ce067')
|
||||
};
|
||||
|
||||
const client = new MongoClient(MONGOHQ_URL, { useNewUrlParser: true });
|
||||
const client = new MongoClient(MONGOHQ_URL);
|
||||
|
||||
const run = async () => {
|
||||
await client.db('admin').command({ ping: 1 });
|
||||
|
||||
Reference in New Issue
Block a user