This commit is contained in:
undefined committed 2025-03-21 02:29:27 +08:00
1 parent e9c5bf5900
commit 0bd15caee6
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -326,7 +326,7 @@ class DomainJoinHandler extends Handler {
async prepare({ domainId }, target: string = domainId) {
const [ddoc, dudoc] = await Promise.all([
domain.get(target),
domain.collUser.findOne({ domainId, uid: this.user._id }),
domain.collUser.findOne({ domainId: target, uid: this.user._id }),
]);
const assignedRole = this.user.hasPriv(PRIV.PRIV_MANAGE_ALL_DOMAIN)
? 'root'
@@ -25,7 +25,9 @@ const page = new NamedPage(['problem_submit', 'contest_detail_problem_submit', '
}
for (const key in availableLangs) {
if (config.langs && !config.langs.filter((i) => i === key || i.startsWith(`${key}.`)).length) continue;
if (window.LANGS[key].pretest?.split('.')[0] === preferences[0].split('.')[0]) preferences.push(key);
if (typeof window.LANGS[key]?.pretest === 'string' && window.LANGS[key].pretest.split('.')[0] === preferences[0].split('.')[0]) {
preferences.push(key);
}
}
renderLanguageSelect(