mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05: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:
parent
5f699ac5ef
commit
0c428e149f
2 changed files with 5 additions and 3 deletions
|
@ -8,7 +8,7 @@ async function getAllTags(userId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function countTagsForProject(userId, projectId) {
|
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) {
|
async function getTagsForProject(userId, projectId) {
|
||||||
|
|
|
@ -16,8 +16,10 @@ async function main() {
|
||||||
|
|
||||||
console.log('## Syncing group subscription memberships...')
|
console.log('## Syncing group subscription memberships...')
|
||||||
|
|
||||||
const subscriptionsCount = await Subscription.count({ groupPlan: true })
|
const subscriptionsCount = await Subscription.countDocuments({
|
||||||
const deletedSubscriptionsCount = await DeletedSubscription.count({
|
groupPlan: true,
|
||||||
|
})
|
||||||
|
const deletedSubscriptionsCount = await DeletedSubscription.countDocuments({
|
||||||
'subscription.groupPlan': true,
|
'subscription.groupPlan': true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue