MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / get

Method get

packages/hydrooj/src/handler/contest.ts:634–649  ·  view source on GitHub ↗
(domainId: string, tid: ObjectId)

Source from the content-addressed store, hash-verified

632class ContestClarificationHandler extends ContestManagementBaseHandler {
633 @param('tid', Types.ObjectId)
634 async get(domainId: string, tid: ObjectId) {
635 const tcdocs = await contest.getMultiClarification(domainId, tid);
636 this.response.body = {
637 tdoc: this.tdoc,
638 tsdoc: this.tsdoc,
639 owner_udoc: await user.getById(domainId, this.tdoc.owner),
640 pdict: await problem.getList(domainId, this.tdoc.pids, true, true, [...problem.PROJECTION_CONTEST_LIST, 'tag']),
641 tcdocs,
642 udict: await user.getListForRender(
643 domainId, tcdocs.map((i) => i.owner),
644 this.user.hasPerm(PERM.PERM_VIEW_USER_PRIVATE_INFO),
645 ),
646 };
647 this.response.pjax = 'partials/contest_clarification.html';
648 this.response.template = 'contest_clarification.html';
649 }
650
651 @param('tid', Types.ObjectId)
652 @param('content', Types.Content)

Callers

nothing calls this directly

Calls 4

getByIdMethod · 0.80
getListForRenderMethod · 0.80
hasPermMethod · 0.80
getListMethod · 0.45

Tested by

no test coverage detected