Merge pull request #15350 from overleaf/csh-issue-11625-mongo-ug-5-notifications

Use mongodb-legacy in notifications for callback support

GitOrigin-RevId: 90f05f747e221c1bd61564e2e28e505d0b125467
This commit is contained in:
Christopher Hoskin
2023-10-24 08:03:15 +00:00
committed by Copybot
parent 6a118d9439
commit e86ef1139e
6 changed files with 208 additions and 78 deletions
@@ -18,11 +18,11 @@ const logger = require('@overleaf/logger')
module.exports = {
check(callback) {
const userId = ObjectId()
const userId = new ObjectId()
const cleanupNotifications = callback =>
db.notifications.remove({ user_id: userId }, callback)
db.notifications.deleteOne({ user_id: userId }, callback)
let notificationKey = `smoke-test-notification-${ObjectId()}`
let notificationKey = `smoke-test-notification-${new ObjectId()}`
const getOpts = endPath => ({
url: `http://localhost:${port}/user/${userId}${endPath}`,
timeout: 5000,