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

Function apply

packages/hydrooj/src/handler/homework.ts:309–321  ·  view source on GitHub ↗
(ctx)

Source from the content-addressed store, hash-verified

307}
308
309export async function apply(ctx) {
310 ctx.Route('homework_main', '/homework', HomeworkMainHandler, PERM.PERM_VIEW_HOMEWORK);
311 ctx.Route('homework_create', '/homework/create', HomeworkEditHandler);
312 ctx.Route('homework_detail', '/homework/:tid', HomeworkDetailHandler, PERM.PERM_VIEW_HOMEWORK);
313 ctx.Route('homework_code', '/homework/:tid/code', ContestCodeHandler, PERM.PERM_VIEW_HOMEWORK);
314 ctx.Route('homework_edit', '/homework/:tid/edit', HomeworkEditHandler);
315 ctx.Route('homework_files', '/homework/:tid/file', HomeworkFilesHandler, PERM.PERM_VIEW_HOMEWORK);
316 ctx.Route('homework_file_download', '/homework/:tid/file/:type/:filename', ContestFileDownloadHandler, PERM.PERM_VIEW_HOMEWORK);
317 await ctx.inject(['scoreboard'], ({ Route }) => {
318 Route('homework_scoreboard', '/homework/:tid/scoreboard', ContestScoreboardHandler, PERM.PERM_VIEW_HOMEWORK_SCOREBOARD);
319 Route('homework_scoreboard_view', '/homework/:tid/scoreboard/:view', ContestScoreboardHandler, PERM.PERM_VIEW_HOMEWORK_SCOREBOARD);
320 });
321}

Callers

nothing calls this directly

Calls 1

RouteMethod · 0.80

Tested by

no test coverage detected