mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: fix contest clarification display (#756)
This commit is contained in:
1 parent
b320f78646
commit
ae7563841f
1 file changed
+2
-2
@@ -963,10 +963,10 @@ export function getClarification(domainId: string, did: ObjectId) {
|
||||
return document.get(domainId, document.TYPE_CONTEST_CLARIFICATION, did);
|
||||
}
|
||||
|
||||
export function getMultiClarification(domainId: string, tid: ObjectId, owner = 0) {
|
||||
export function getMultiClarification(domainId: string, tid: ObjectId, owner?: number) {
|
||||
return document.getMulti(
|
||||
domainId, document.TYPE_CONTEST_CLARIFICATION,
|
||||
{ parentType: document.TYPE_CONTEST, parentId: tid, ...(owner ? { owner: { $in: [owner, 0] } } : {}) },
|
||||
{ parentType: document.TYPE_CONTEST, parentId: tid, ...(typeof owner === 'number' ? { owner: { $in: [owner, 0] } } : {}) },
|
||||
).sort('_id', -1).toArray();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user