mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 10:31:10 +00:00
[misc] mongodb: drop intermediate dbPromise
It would confuse the logic of a follow-up commit.
This commit is contained in:
parent
1b70189fb1
commit
a52c0fe9fb
1 changed files with 1 additions and 2 deletions
|
@ -2,10 +2,9 @@ const Settings = require('settings-sharelatex')
|
|||
const { MongoClient, ObjectId } = require('mongodb')
|
||||
|
||||
const clientPromise = MongoClient.connect(Settings.mongo.url)
|
||||
const dbPromise = clientPromise.then((client) => client.db())
|
||||
|
||||
async function getCollection(name) {
|
||||
return (await dbPromise).collection(name)
|
||||
return (await clientPromise).db().collection(name)
|
||||
}
|
||||
|
||||
async function waitForDb() {
|
||||
|
|
Loading…
Reference in a new issue