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
e06283c0cc
commit
97b0d782b9
24 files changed
+466
-105
No files matched your search
+7
-6
@@ -118,6 +118,12 @@ class ContestScoreboardHiddenError extends ForbiddenError {
|
||||
this.params = [tid];
|
||||
}
|
||||
}
|
||||
class TrainingAlreadyEnrollError extends ForbiddenError {
|
||||
constructor(tid, uid) {
|
||||
super("You've already enrolled this training.");
|
||||
this.params = [tid, uid];
|
||||
}
|
||||
}
|
||||
class ProblemNotFoundError extends NotFoundError {
|
||||
constructor(pid) {
|
||||
super('ProblemNotFoundError');
|
||||
@@ -180,6 +186,7 @@ module.exports = {
|
||||
ContestAlreadyAttendedError,
|
||||
UserFacingError,
|
||||
SystemError,
|
||||
TrainingAlreadyEnrollError,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -337,12 +344,6 @@ class TrainingRequirementNotSatisfiedError(ForbiddenError):
|
||||
return 'Training requirement is not satisfied.'
|
||||
|
||||
|
||||
class TrainingAlreadyEnrollError(ForbiddenError):
|
||||
@property
|
||||
def message(self):
|
||||
return "You've already enrolled this training."
|
||||
|
||||
|
||||
class UsageExceededError(ForbiddenError):
|
||||
@property
|
||||
def message(self):
|
||||
|
||||
Reference in new issue
Block a user