mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +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('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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user