mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: update to mongodb5 (#514)
This commit is contained in:
1 parent
5a02010120
commit
0685b88066
59 files changed
+610
-601
No files matched your search
@@ -3,7 +3,7 @@
|
||||
import mysql from 'mysql';
|
||||
import TurndownService from 'turndown';
|
||||
import {
|
||||
buildContent, ContestModel, DomainModel, fs, noop, NotFoundError, ObjectID, postJudge, ProblemModel,
|
||||
buildContent, ContestModel, DomainModel, fs, noop, NotFoundError, ObjectId, postJudge, ProblemModel,
|
||||
RecordDoc, RecordModel, SolutionModel, STATUS, SystemModel, Time, UserModel,
|
||||
} from 'hydrooj';
|
||||
|
||||
@@ -269,7 +269,7 @@ export async function run({
|
||||
const [source] = await query(`SELECT \`source\` FROM \`source_code\` WHERE \`solution_id\` = ${rdoc.solution_id}`);
|
||||
if (source[0]?.source) data.code = source[0].source;
|
||||
if (rdoc.contest_id) {
|
||||
data.contest = new ObjectID(tidMap[rdoc.contest_id]);
|
||||
data.contest = new ObjectId(tidMap[rdoc.contest_id]);
|
||||
await ContestModel.attend(domainId, data.contest, uidMap[rdoc.user_id]).catch(noop);
|
||||
}
|
||||
await RecordModel.coll.insertOne(data);
|
||||
|
||||
Reference in new issue
Block a user