mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: record_main: disable stats by default
This commit is contained in:
1 file changed
+3
-2
@@ -34,10 +34,11 @@ export class RecordListHandler extends ContestDetailBaseHandler {
|
|||||||
@param('fullStatus', Types.Boolean)
|
@param('fullStatus', Types.Boolean)
|
||||||
@param('all', Types.Boolean)
|
@param('all', Types.Boolean)
|
||||||
@param('allDomain', Types.Boolean)
|
@param('allDomain', Types.Boolean)
|
||||||
|
@param('stat', Types.Boolean)
|
||||||
async get(
|
async get(
|
||||||
domainId: string, page = 1, pid?: string | number, tid?: ObjectId,
|
domainId: string, page = 1, pid?: string | number, tid?: ObjectId,
|
||||||
uidOrName?: string, lang?: string, status?: number, full = false,
|
uidOrName?: string, lang?: string, status?: number, full = false,
|
||||||
all = false, allDomain = false,
|
all = false, allDomain = false, stat = false,
|
||||||
) {
|
) {
|
||||||
const notification = [];
|
const notification = [];
|
||||||
let tdoc = null;
|
let tdoc = null;
|
||||||
@@ -122,7 +123,7 @@ export class RecordListHandler extends ContestDetailBaseHandler {
|
|||||||
filterStatus: status,
|
filterStatus: status,
|
||||||
notification,
|
notification,
|
||||||
};
|
};
|
||||||
if (this.user.hasPriv(PRIV.PRIV_VIEW_JUDGE_STATISTICS) && !full) {
|
if (this.user.hasPriv(PRIV.PRIV_VIEW_JUDGE_STATISTICS) && stat) {
|
||||||
this.response.body.statistics = await record.stat(allDomain ? undefined : domainId);
|
this.response.body.statistics = await record.stat(allDomain ? undefined : domainId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user