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
41261f8c4b
commit
4c2edc3948
5 files changed
+48
-21
No files matched your search
+9
-6
@@ -25,6 +25,13 @@ class NotFoundError extends UserFacingError {
|
||||
}
|
||||
}
|
||||
|
||||
class AlreadyVotedError extends BadRequestError {
|
||||
constructor(psid, uid) {
|
||||
super('You\'ve already voted.');
|
||||
this.params = [psid, uid];
|
||||
}
|
||||
}
|
||||
|
||||
class LoginError extends ForbiddenError {
|
||||
constructor(uname) {
|
||||
super('LoginError');
|
||||
@@ -122,7 +129,8 @@ module.exports = {
|
||||
UserNotFoundError, VerifyPasswordError, ProblemDataNotFoundError,
|
||||
OpcountExceededError, PermissionError, NoProblemError,
|
||||
ValidationError, ProblemNotFoundError, TrainingNotFoundError,
|
||||
ContestNotFoundError, RecordNotFoundError, SolutionNotFoundError
|
||||
ContestNotFoundError, RecordNotFoundError, SolutionNotFoundError,
|
||||
AlreadyVotedError
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -199,11 +207,6 @@ class InvalidOperationError(ForbiddenError):
|
||||
pass
|
||||
|
||||
|
||||
class AlreadyVotedError(ForbiddenError):
|
||||
@property
|
||||
def message(self):
|
||||
return "You've already voted."
|
||||
|
||||
|
||||
class InvalidTokenDigestError(ForbiddenError):
|
||||
pass
|
||||
|
||||
Reference in new issue
Block a user