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

Method postRank

packages/hydrooj/src/handler/contest.ts:744–749  ·  view source on GitHub ↗
(domainId: string, tid: ObjectId, uid: number)

Source from the content-addressed store, hash-verified

742 @param('tid', Types.ObjectId)
743 @param('uid', Types.PositiveInt)
744 async postRank(domainId: string, tid: ObjectId, uid: number) {
745 const tsdoc = await contest.getStatus(domainId, tid, uid);
746 if (!tsdoc) throw new ContestNotAttendedError(uid);
747 await contest.setStatus(domainId, tid, uid, { unrank: !tsdoc.unrank });
748 this.back();
749 }
750
751 @param('tid', Types.ObjectId)
752 @param('uid', Types.PositiveInt)

Callers

nothing calls this directly

Calls 3

setStatusMethod · 0.80
backMethod · 0.80
getStatusMethod · 0.45

Tested by

no test coverage detected