mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-02 09:42:05 +00:00
* feat: 忘记密码支持通过手机找回,邮箱方式修改为和手机方式一致 * feat: 翻译 * feat: 修改翻译 * fix: 还原 Co-authored-by: Jiangjie.Bai <bugatti_it@163.com>
18 lines
471 B
Python
18 lines
471 B
Python
from common.sdk.sms.endpoint import SMS
|
|
from .base import BackendBase
|
|
|
|
|
|
class SMS(BackendBase):
|
|
account_field = 'phone'
|
|
is_enable_field_in_settings = 'SMS_ENABLED'
|
|
|
|
def __init__(self):
|
|
self.client = SMS()
|
|
|
|
def send_msg(self, users, sign_name: str, template_code: str, template_param: dict):
|
|
accounts, __, __ = self.get_accounts(users)
|
|
return self.client.send_sms(accounts, sign_name, template_code, template_param)
|
|
|
|
|
|
backend = SMS
|