fix: generate_sms_code raises exception with error details instead of returning None

This commit is contained in:
yumoqing 2026-05-31 11:56:44 +08:00
parent 8a2a7d02ed
commit b1e08c46f5

View File

@ -180,7 +180,7 @@ class SMSEngine:
if d['status']: if d['status']:
return code_id, code return code_id, code
else: else:
return None raise Exception(d.get('msg', '短信发送失败'))
async def check_sms_code(self, code_id: str, vcode: str) -> bool: async def check_sms_code(self, code_id: str, vcode: str) -> bool:
env = ServerEnv() env = ServerEnv()