core&ui: fix contestTimer on duration contest (#576)

This commit is contained in:
panda authored and GitHub committed 2023-05-16 08:02:02 +08:00
1 parent 58cab9919d
commit 5b78afeba5
8 files changed
+15 -6

No files matched your search

+1
View File
@@ -371,6 +371,7 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
};
if (this.tdoc && this.tsdoc) {
const fields = ['attend', 'startAt'];
if (this.tdoc.duration) fields.push('endAt');
if (contest.canShowSelfRecord.call(this, this.tdoc, true)) fields.push('detail');
this.response.body.tsdoc = pick(this.tsdoc, fields);
}