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

Method postUpvote

packages/hydrooj/src/handler/problem.ts:929–933  ·  view source on GitHub ↗
(domainId: string, psid: ObjectId)

Source from the content-addressed store, hash-verified

927
928 @param('psid', Types.ObjectId)
929 async postUpvote(domainId: string, psid: ObjectId) {
930 this.checkPerm(PERM.PERM_VOTE_PROBLEM_SOLUTION);
931 const psdoc = await solution.vote(domainId, psid, this.user._id, 1);
932 this.back({ vote: psdoc.vote, user_vote: 1 });
933 }
934
935 @param('psid', Types.ObjectId)
936 async postDownvote(domainId: string, psid: ObjectId) {

Callers

nothing calls this directly

Calls 3

checkPermMethod · 0.80
voteMethod · 0.80
backMethod · 0.80

Tested by

no test coverage detected