core: remove undocumented domain.union feature

This commit is contained in:
undefined committed 2022-10-03 14:27:59 +08:00
1 parent f93108f160
commit efb8adfe6d
7 files changed
+12 -36

No files matched your search

+2 -3
View File
@@ -152,9 +152,8 @@ export class ProblemModel {
page: number, pageSize: number,
projection = ProblemModel.PROJECTION_LIST, uid?: number,
): Promise<[ProblemDoc[], number, number]> {
const union = await DomainModel.getUnion(domainId);
const domainIds = [domainId];
if (union?.problem) domainIds.push(...union.union);
const union = await DomainModel.get(domainId);
const domainIds = [domainId, ...(union.union || [])];
let count = 0;
const pdocs = [];
for (const id of domainIds) {