We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 734a463 commit 3b51bb3Copy full SHA for 3b51bb3
upgrade/scripts/3.4.0/subscription-origin.js
@@ -6,6 +6,6 @@ exports.exec = async (db, debug) => {
6
const defaultOrigin = new URL(config.publicUrl).origin
7
for await (const subscription of db.collection('subscriptions').find({ origin: { $exists: false } })) {
8
const origin = subscription.urlTemplate ? new URL(subscription.urlTemplate).origin : defaultOrigin
9
- await db.collection.updateOne({ _id: subscription._id }, { $set: { origin } })
+ await db.collection('subscriptions').updateOne({ _id: subscription._id }, { $set: { origin } })
10
}
11
0 commit comments