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

Method setStar

packages/hydrooj/src/model/problem.ts:455–457  ·  view source on GitHub ↗
(domainId: string, pid: number, uid: number, star: boolean)

Source from the content-addressed store, hash-verified

453 }
454
455 static setStar(domainId: string, pid: number, uid: number, star: boolean) {
456 return document.setStatus(domainId, document.TYPE_PROBLEM, pid, uid, { star });
457 }
458
459 static canViewBy(pdoc: ProblemDoc, udoc: User) {
460 if (!udoc.hasPerm(PERM.PERM_VIEW_PROBLEM)) return false;

Callers 2

postStarMethod · 0.45
postStarMethod · 0.45

Calls 1

setStatusMethod · 0.80

Tested by

no test coverage detected