perf: 优化忘记密码

This commit is contained in:
ibuler
2023-10-07 13:07:47 +08:00
committed by Bryan
parent 896d42c53e
commit 27c505853b
8 changed files with 678 additions and 599 deletions

View File

@@ -36,3 +36,11 @@ class FeiShuNotBound(JMSException):
class PasswordInvalid(JMSException):
default_code = 'passwd_invalid'
default_detail = _('Your password is invalid')
class IntervalTooShort(JMSException):
default_code = 'interval_too_short'
default_detail = _('Please wait for %s seconds before retry')
def __init__(self, interval, *args, **kwargs):
super().__init__(detail=self.default_detail % interval, *args, **kwargs)