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

Method get

packages/hydrooj/src/handler/misc.ts:47–55  ·  view source on GitHub ↗
({ })

Source from the content-addressed store, hash-verified

45 }
46
47 async get({ }) {
48 if (!this.udoc._files?.length) this.checkPriv(PRIV.PRIV_CREATE_FILE);
49 this.response.body = {
50 files: sortFiles(this.udoc._files),
51 urlForFile: (filename: string) => this.url('fs_download', { uid: this.udoc._id, filename }),
52 };
53 this.response.pjax = 'partials/files.html';
54 this.response.template = 'home_files.html';
55 }
56
57 @post('filename', Types.Filename)
58 async postUploadFile({ }, filename: string) {

Callers 2

postUploadFileMethod · 0.45
getMethod · 0.45

Calls 3

sortFilesFunction · 0.90
checkPrivMethod · 0.80
urlMethod · 0.80

Tested by

no test coverage detected