mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
core: set ProblemFilesHandler to notUsage
This commit is contained in:
1 parent
9a18d2f4c7
commit
c64ce03c91
3 files changed
+5
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.29.39",
|
||||
"version": "2.29.40",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -322,6 +322,8 @@ export class ProblemEditHandler extends ProblemManageHandler {
|
||||
}
|
||||
|
||||
export class ProblemFilesHandler extends ProblemDetailHandler {
|
||||
notUsage = true;
|
||||
|
||||
@param('testdata', Types.Boolean)
|
||||
@param('additional_file', Types.Boolean)
|
||||
@param('pjax', Types.Boolean)
|
||||
|
||||
@@ -408,6 +408,7 @@ export class Handler extends HandlerCommon {
|
||||
csrfToken: string;
|
||||
loginMethods: any;
|
||||
noCheckPermView: boolean;
|
||||
notUsage: boolean;
|
||||
__param: Record<string, ParamOption[]>;
|
||||
|
||||
constructor(ctx: Koa.Context) {
|
||||
@@ -484,7 +485,7 @@ export class Handler extends HandlerCommon {
|
||||
}
|
||||
|
||||
async init({ domainId }) {
|
||||
if (!argv.options.benchmark) await this.limitRate('global', 10, 88);
|
||||
if (!argv.options.benchmark && !this.notUsage) await this.limitRate('global', 10, 88);
|
||||
const [absoluteDomain, inferDomain, bdoc] = await Promise.all([
|
||||
domain.get(domainId),
|
||||
domain.getByHost(this.request.host),
|
||||
|
||||
Reference in new issue
Block a user