chore: upgrade mongoose to v8.10.x for security (#3868)

* chore: upgrade mongoose to v8.10.x for security

* chore: remove duplicate code

* fix: ts error
This commit is contained in:
Finley Ge
2025-02-26 18:32:19 +08:00
committed by GitHub
parent cf9c8e9f6a
commit 747bb303ec
7 changed files with 54 additions and 13 deletions

View File

@@ -64,7 +64,7 @@ export const checkTeamDatasetLimit = async (teamId: string) => {
export const checkTeamAppLimit = async (teamId: string, amount = 1) => {
const [{ standardConstants }, appCount] = await Promise.all([
getTeamStandPlan({ teamId }),
MongoApp.count({
MongoApp.countDocuments({
teamId,
type: { $in: [AppTypeEnum.simple, AppTypeEnum.workflow, AppTypeEnum.plugin] }
})