mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
一些优化
优化 Date.prototype.format 修复题目分类解析错误的问题 Interface Tdoc X-Forwarded-For 支持
This commit is contained in:
1 parent
1722fbfaca
commit
82c193b5ee
19 files changed
+289
-182
No files matched your search
+2
-5
@@ -52,6 +52,7 @@ export const ForbiddenError = Err('ForbiddenError', UserFacingError, 'ForbiddenE
|
||||
export const NotFoundError = Err('NotFoundError', UserFacingError, 'NotFoundError', 404);
|
||||
export const MethodNotAllowedError = Err('MethodNotAllowedError', UserFacingError, 'MethodNotAllowedError', 405);
|
||||
export const RemoteOnlineJudgeError = Err('RemoteOnlineJudgeError', UserFacingError, 'RemoteOnlineJudgeError', 500);
|
||||
export const SendMailError = Err('SendMailError', UserFacingError, 'Failed to send mail to {0}.', 500);
|
||||
|
||||
export const AlreadyVotedError = Err('AlreadyVotedError', ForbiddenError, "You've already voted.");
|
||||
export const LoginError = Err('LoginError', ForbiddenError, 'Invalid password for user {0}.');
|
||||
@@ -103,6 +104,7 @@ global.Hydro.error = {
|
||||
BlacklistedError,
|
||||
ForbiddenError,
|
||||
NotFoundError,
|
||||
SendMailError,
|
||||
LoginError,
|
||||
CsrfTokenError,
|
||||
MethodNotAllowedError,
|
||||
@@ -188,9 +190,4 @@ class InvalidArgumentError(BadRequestError):
|
||||
@property
|
||||
def message(self):
|
||||
return 'Argument {0} is invalid.'
|
||||
|
||||
class SendMailError(UserFacingError):
|
||||
@property
|
||||
def message(self):
|
||||
return 'Failed to send mail to {0}.'
|
||||
*/
|
||||
Reference in new issue
Block a user