mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01: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",
|
"name": "hydrooj",
|
||||||
"version": "2.29.39",
|
"version": "2.29.40",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"typings": "dist/loader.d.ts",
|
"typings": "dist/loader.d.ts",
|
||||||
|
|||||||
@@ -322,6 +322,8 @@ export class ProblemEditHandler extends ProblemManageHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class ProblemFilesHandler extends ProblemDetailHandler {
|
export class ProblemFilesHandler extends ProblemDetailHandler {
|
||||||
|
notUsage = true;
|
||||||
|
|
||||||
@param('testdata', Types.Boolean)
|
@param('testdata', Types.Boolean)
|
||||||
@param('additional_file', Types.Boolean)
|
@param('additional_file', Types.Boolean)
|
||||||
@param('pjax', Types.Boolean)
|
@param('pjax', Types.Boolean)
|
||||||
|
|||||||
@@ -408,6 +408,7 @@ export class Handler extends HandlerCommon {
|
|||||||
csrfToken: string;
|
csrfToken: string;
|
||||||
loginMethods: any;
|
loginMethods: any;
|
||||||
noCheckPermView: boolean;
|
noCheckPermView: boolean;
|
||||||
|
notUsage: boolean;
|
||||||
__param: Record<string, ParamOption[]>;
|
__param: Record<string, ParamOption[]>;
|
||||||
|
|
||||||
constructor(ctx: Koa.Context) {
|
constructor(ctx: Koa.Context) {
|
||||||
@@ -484,7 +485,7 @@ export class Handler extends HandlerCommon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async init({ domainId }) {
|
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([
|
const [absoluteDomain, inferDomain, bdoc] = await Promise.all([
|
||||||
domain.get(domainId),
|
domain.get(domainId),
|
||||||
domain.getByHost(this.request.host),
|
domain.getByHost(this.request.host),
|
||||||
|
|||||||
Reference in new issue
Block a user