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

Method postSubmit

packages/hydrooj/src/handler/problem.ts:869–873  ·  view source on GitHub ↗
(domainId: string, content: string)

Source from the content-addressed store, hash-verified

867
868 @param('content', Types.Content)
869 async postSubmit(domainId: string, content: string) {
870 this.checkPerm(PERM.PERM_CREATE_PROBLEM_SOLUTION);
871 const psid = await solution.add(domainId, this.pdoc.docId, this.user._id, content);
872 this.back({ psid });
873 }
874
875 @param('content', Types.Content)
876 @param('psid', Types.ObjectId)

Callers 1

renderMethod · 0.80

Calls 3

checkPermMethod · 0.80
backMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected