core: update judge config

This commit is contained in:
undefined committed 2022-02-25 12:09:32 +08:00
1 parent d13876a5bc
commit a2004056ac
22 files changed
+100 -245

No files matched your search

+1
View File
@@ -72,6 +72,7 @@ class RecordModel {
pdoc = await problem.get(pdoc.reference.domainId, pdoc.reference.pid);
if (!pdoc) throw new ProblemNotFoundError(rdoc.domainId, rdoc.pid);
}
(config as any).problemOwner = pdoc.owner;
source = `${pdoc.domainId}/${pdoc.docId}`;
data = pdoc.data;
if (typeof pdoc.config === 'string') throw new Error(pdoc.config);
+4
View File
@@ -683,6 +683,10 @@ const scripts: UpgradeScript[] = [
await TaskModel.deleteMany({ type: 'schedule', subType: 'contest.problemHide' });
return true;
},
async function _59_60() {
const langs = await system.get('hydrooj.langs');
await system.set('hydrooj.langs', langs.replace(/\$\{dir\}/g, '/w').replace(/\$\{name\}/g, 'foo'));
},
];
export default scripts;