core: fix tsdoc.endAt display

This commit is contained in:
undefined committed 2022-08-01 20:13:04 +08:00
1 parent a8675a45c5
commit 981f8a4b9d
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.15.2",
"version": "3.15.3",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
+1 -1
View File
@@ -102,7 +102,7 @@ export class ContestDetailBaseHandler extends Handler {
throw new ForbiddenError('You are not assigned.');
}
}
if (this.tdoc.duration && this.tsdoc?.attend) {
if (this.tdoc.duration && this.tsdoc?.startAt) {
this.tsdoc.endAt = moment(this.tsdoc.startAt).add(this.tdoc.duration, 'hours').toDate();
}
}