core: rp: fix wrong contest status count (#530)

This commit is contained in:
panda authored and GitHub committed 2023-03-06 23:10:45 +08:00
1 parent 2731d4ba3a
commit 4df9527eac
7 files changed
+20 -5

No files matched your search

+7
View File
@@ -173,6 +173,12 @@ export function count<K extends keyof DocType>(
return coll.countDocuments({ ...query, docType, domainId });
}
export function countStatus<K extends keyof DocStatusType>(
domainId: string, docType: K, query?: Filter<DocStatusType[K]>,
) {
return collStatus.countDocuments({ ...query, docType, domainId });
}
export async function push<K extends keyof DocType>(
domainId: string, docType: K, docId: DocType[K]['docId'],
key: ArrayKeys<DocType[K]>, value: DocType[K][0],
@@ -463,6 +469,7 @@ global.Hydro.model.document = {
addToSet,
cappedIncStatus,
count,
countStatus,
deleteMulti,
deleteMultiStatus,
deleteOne,