mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: rp: fix wrong contest status count (#530)
This commit is contained in:
1 parent
2731d4ba3a
commit
4df9527eac
7 files changed
+20
-5
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user