feat: 短信功能的全局开关
This commit is contained in:
parent
d6a9a683f1
commit
9458276ad1
|
@ -11,6 +11,8 @@ myLogger = logging.getLogger('log')
|
|||
@auto_log(name='阿里云短信', raise_exception=True, send_mail=True)
|
||||
def send_sms(phone: str, template_code: int, template_param: dict):
|
||||
config = get_sysconfig()
|
||||
if config['sms'].get('enabled', True) is False:
|
||||
return
|
||||
client = AcsClient(config['sms']['xn_key'], config['sms']['xn_secret'], 'default')
|
||||
request = CommonRequest()
|
||||
# 固定json
|
||||
|
|
Loading…
Reference in New Issue