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

Method prepare

packages/hydrooj/src/handler/homework.ts:258–262  ·  view source on GitHub ↗
(domainId: string, tid: ObjectId)

Source from the content-addressed store, hash-verified

256
257 @param('tid', Types.ObjectId)
258 async prepare(domainId: string, tid: ObjectId) {
259 this.tdoc = await contest.get(domainId, tid);
260 if (!this.user.own(this.tdoc)) this.checkPerm(PERM.PERM_EDIT_HOMEWORK);
261 else this.checkPerm(PERM.PERM_EDIT_HOMEWORK_SELF);
262 }
263
264 @param('tid', Types.ObjectId)
265 async get(domainId: string, tid: ObjectId) {

Callers

nothing calls this directly

Calls 3

ownMethod · 0.80
checkPermMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected