mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
修复参加比赛的错误
This commit is contained in:
1 parent
32ad47e031
commit
f40e4e2c74
10 files changed
+62
-38
No files matched your search
+7
-7
@@ -92,6 +92,12 @@ class ContestNotAttendedError extends ForbiddenError {
|
||||
this.params = [tid];
|
||||
}
|
||||
}
|
||||
class ContestAlreadyAttendedError extends ForbiddenError {
|
||||
constructor(tid, uid) {
|
||||
super('You\'ve already attended this contest.');
|
||||
this.params = [tid, uid];
|
||||
}
|
||||
}
|
||||
class ContestNotLiveError extends ForbiddenError {
|
||||
constructor(tid) {
|
||||
super('This contest is not live.');
|
||||
@@ -148,7 +154,7 @@ module.exports = {
|
||||
ValidationError, ProblemNotFoundError, TrainingNotFoundError,
|
||||
ContestNotFoundError, RecordNotFoundError, SolutionNotFoundError,
|
||||
AlreadyVotedError, ContestNotAttendedError, ContestNotLiveError,
|
||||
ContestScoreboardHiddenError
|
||||
ContestScoreboardHiddenError, ContestAlreadyAttendedError
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -278,12 +284,6 @@ class InvalidJoinInvitationCodeError(ForbiddenError):
|
||||
return 'The invitation code you provided is invalid.'
|
||||
|
||||
|
||||
class ContestAlreadyAttendedError(ForbiddenError):
|
||||
@property
|
||||
def message(self):
|
||||
return "You've already attended this contest."
|
||||
|
||||
|
||||
class HomeworkScoreboardHiddenError(ForbiddenError):
|
||||
@property
|
||||
def message(self):
|
||||
|
||||
Reference in new issue
Block a user