mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-08 08:39:03 +02:00
Update mongoose count usages to countDocuments
count was removed see: https://mongoosejs.com/docs/migrating_to_8.html#removed-count. GitOrigin-RevId: 308c8f4b681269c29669c45b5f2022404b3af463
This commit is contained in:
@@ -8,7 +8,7 @@ async function getAllTags(userId) {
|
||||
}
|
||||
|
||||
async function countTagsForProject(userId, projectId) {
|
||||
return Tag.count({ user_id: userId, project_ids: projectId })
|
||||
return Tag.countDocuments({ user_id: userId, project_ids: projectId })
|
||||
}
|
||||
|
||||
async function getTagsForProject(userId, projectId) {
|
||||
|
||||
@@ -16,8 +16,10 @@ async function main() {
|
||||
|
||||
console.log('## Syncing group subscription memberships...')
|
||||
|
||||
const subscriptionsCount = await Subscription.count({ groupPlan: true })
|
||||
const deletedSubscriptionsCount = await DeletedSubscription.count({
|
||||
const subscriptionsCount = await Subscription.countDocuments({
|
||||
groupPlan: true,
|
||||
})
|
||||
const deletedSubscriptionsCount = await DeletedSubscription.countDocuments({
|
||||
'subscription.groupPlan': true,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user