mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-28 21:54:34 +00:00
e86ef1139e
Use mongodb-legacy in notifications for callback support GitOrigin-RevId: 90f05f747e221c1bd61564e2e28e505d0b125467
18 lines
405 B
JavaScript
18 lines
405 B
JavaScript
const Metrics = require('@overleaf/metrics')
|
|
const Settings = require('@overleaf/settings')
|
|
const { MongoClient, ObjectId } = require('mongodb-legacy')
|
|
|
|
const mongoClient = new MongoClient(Settings.mongo.url)
|
|
const mongoDb = mongoClient.db()
|
|
|
|
const db = {
|
|
notifications: mongoDb.collection('notifications'),
|
|
}
|
|
|
|
Metrics.mongodb.monitor(mongoClient)
|
|
|
|
module.exports = {
|
|
db,
|
|
mongoClient,
|
|
ObjectId,
|
|
}
|