mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui&judge: bug fixes and improvements
This commit is contained in:
4 files changed
+4
-2
No files matched your search
@@ -245,6 +245,7 @@ export class ContestDetailHandler extends Handler {
|
||||
@param('tid', Types.ObjectId)
|
||||
@param('code', Types.String, true)
|
||||
async postAttend(domainId: string, tid: ObjectId, code = '') {
|
||||
this.checkPerm(PERM.PERM_ATTEND_CONTEST);
|
||||
if (contest.isDone(this.tdoc)) throw new ContestNotLiveError(tid);
|
||||
if (this.tdoc._code && code !== this.tdoc._code) throw new InvalidTokenError('Contest Invitation', code);
|
||||
await contest.attend(domainId, tid, this.user._id);
|
||||
|
||||
Reference in new issue
Block a user