core: 修复导出比赛结果功能

This commit is contained in:
undefined committed 2020-11-09 22:29:10 +08:00
1 parent 1f4420fbaa
commit 5bdd77ca28
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.13.47",
"version": "2.13.48",
"bin": "bin/hydrooj.js",
"main": "dist/loader.js",
"typings": "dist/loader.d.ts",
+2 -2
View File
@@ -152,8 +152,8 @@ class ContestScoreboardDownloadHandler extends ContestHandler {
html: (rows) => this.renderHTML('contest_scoreboard_download_html.html', { rows }),
};
if (!getContent[ext]) throw new ValidationError('ext');
const [, rows] = await this.getScoreboard(domainId, tid, true);
this.binary(await getContent[ext](rows), `${this.tdoc.title}.${ext}`);
const [tdoc, rows] = await this.getScoreboard(domainId, tid, true);
this.binary(await getContent[ext](rows), `${tdoc.title}.${ext}`);
}
}