core: scoreboard

This commit is contained in:
undefined committed 2022-04-05 20:34:40 +08:00
1 parent 5c01cc44d8
commit 476457ac23
5 files changed
+9 -5

No files matched your search

+1 -1
View File
@@ -208,7 +208,7 @@ export class ContestScoreboardDownloadHandler extends Handler {
async get(domainId: string, tid: ObjectID, ext: string, ignoreLock = false) {
await this.limitRate('scoreboard_download', 120, 3);
const getContent = {
csv: async (rows) => `\uFEFF${rows.map((c) => (c.map((i) => i.value).join(','))).join('\n')}`,
csv: async (rows) => `\uFEFF${rows.map((c) => (c.map((i) => i.value.replace(/\n/g, ' ')).join(','))).join('\n')}`,
html: (rows, tdoc) => this.renderHTML('contest_scoreboard_download_html.html', { rows, tdoc }),
};
const tdoc = await contest.get(domainId, tid);