mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: fix group filter display
This commit is contained in:
5 files changed
+11
-6
No files matched your search
@@ -77,7 +77,7 @@ export class ContestListHandler extends Handler {
|
||||
@param('page', Types.PositiveInt, true)
|
||||
async get(domainId: string, rule = '', group = '', page = 1) {
|
||||
if (rule && contest.RULES[rule].hidden) throw new BadRequestError();
|
||||
const groups = (await user.listGroup(domainId, this.user._id)).map((i) => i.name);
|
||||
const groups = (await user.listGroup(domainId, this.user._id)).map((i) => i.name).filter((i) => !Number.isSafeInteger(+i));
|
||||
if (group && !groups.includes(group)) throw new NotAssignedError(group);
|
||||
const rules = Object.keys(contest.RULES).filter((i) => !contest.RULES[i].hidden);
|
||||
const q = {
|
||||
|
||||
Reference in new issue
Block a user