优化rating计算速度

This commit is contained in:
masnn committed 2020-06-09 13:22:04 +08:00
1 parent 45f1184d68
commit 55912b087d
22 files changed
+309 -178

No files matched your search

+2 -2
View File
@@ -282,7 +282,7 @@ class ContestCreateHandler extends ContestHandler {
}
async post({
domainId, title, content, rule, beginAtDate, beginAtTime, duration, pids,
domainId, title, content, rule, beginAtDate, beginAtTime, duration, pids, rated = false,
}) {
let beginAt;
try {
@@ -294,7 +294,7 @@ class ContestCreateHandler extends ContestHandler {
pids = await this.verifyProblems(domainId, pids);
const tid = await contest.add(
domainId, title, content,
this.user._id, rule, beginAt, endAt, pids,
this.user._id, rule, beginAt, endAt, pids, rated,
);
this.response.body = { tid };
this.response.redirect = `/c/${tid}`;