core, ui, judge: rewrite http & ws layer (#352)

This commit is contained in:
undefined authored and GitHub committed 2022-05-03 20:22:12 +08:00
1 parent 3d2384f31a
commit 5af082eac8
37 files changed
+868 -889

No files matched your search

+2 -2
View File
@@ -40,8 +40,8 @@ registerResolver(
'Query', 'contest(id: ObjectID!)', 'Contest',
async (arg, ctx) => {
arg.id = new ObjectID(arg.id);
ctx.tdoc = await contest.get(ctx.domainId, new ObjectID(arg.id));
if (!ctx.tdoc) throw new ContestNotFoundError(ctx.domainId, arg.id);
ctx.tdoc = await contest.get(ctx.args.domainId, new ObjectID(arg.id));
if (!ctx.tdoc) throw new ContestNotFoundError(ctx.args.domainId, arg.id);
return ctx.tdoc;
},
'Get a contest by ID',