feat: base 短信发送读取配置
This commit is contained in:
parent
b1a574051c
commit
171348fbbd
|
@ -12,7 +12,7 @@ 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:
|
||||
if config.get("sms", {}).get('enabled', True) is False:
|
||||
return
|
||||
try:
|
||||
client = AcsClient(config['sms']['xn_key'],
|
||||
|
|
Loading…
Reference in New Issue