Merge branch 'master' into 367

This commit is contained in:
undefined committed 2022-06-03 02:58:54 +08:00
commit e6b3b5c530
5 files changed
+13 -5

No files matched your search

+1
View File
@@ -501,6 +501,7 @@ export class ProblemSubmitHandler extends ProblemDetailHandler {
code = await readFile(file.filepath, 'utf-8');
}
} else if (code.startsWith('@@hydro_submission_file@@')) throw new ValidationError('code');
await this.limitRate('add_record', 60, system.get('limit.submission_user'), true);
await this.limitRate('add_record', 60, system.get('limit.submission'));
const rid = await record.add(domainId, this.pdoc.docId, this.user._id, lang, code, true, pretest ? input : tid, tid && !pretest);
const rdoc = await record.get(domainId, rid);