core: record_main: disable stats by default

This commit is contained in:
undefined committed 2025-12-28 06:06:48 +08:00
1 parent a0fb1aa704
commit c45975ae33
1 file changed
+3 -2
+3 -2
View File
@@ -34,10 +34,11 @@ export class RecordListHandler extends ContestDetailBaseHandler {
@param('fullStatus', Types.Boolean)
@param('all', Types.Boolean)
@param('allDomain', Types.Boolean)
@param('stat', Types.Boolean)
async get(
domainId: string, page = 1, pid?: string | number, tid?: ObjectId,
uidOrName?: string, lang?: string, status?: number, full = false,
all = false, allDomain = false,
all = false, allDomain = false, stat = false,
) {
const notification = [];
let tdoc = null;
@@ -122,7 +123,7 @@ export class RecordListHandler extends ContestDetailBaseHandler {
filterStatus: status,
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);
}
}