bug fixes

This commit is contained in:
undefined committed 2025-10-23 17:57:29 +08:00
1 parent d0944bdde9
commit 2f2e006eff
10 files changed
+56 -65

No files matched your search

+4 -3
View File
@@ -1,6 +1,6 @@
import path from 'path';
import {
ContestModel, Context, fs, getAlphabeticId, ObjectId, PERM, Schema, STATUS, Types, UserModel,
avatar, ContestModel, Context, fs, getAlphabeticId, ObjectId, PERM, Schema, STATUS, Types, UserModel,
} from 'hydrooj';
const file = fs.readFileSync(path.join(__dirname, 'public/assets/board.html'), 'utf8');
@@ -47,8 +47,9 @@ export async function apply(ctx: Context) {
team_id: `${udoc._id}`,
name: udoc.uname,
organization: udoc.school,
members: [],
coach: '',
members: udoc.members?.split(',').filter((t) => t) || [],
coach: udoc.coach,
badge: { url: avatar(udoc.avatar) },
group: [
...(udoc.group || []),
i.unrank ? 'unofficial' : 'official',