Selaa lähdekoodia

fix: 先不校验验证码

alphah 2 viikkoa sitten
vanhempi
sitoutus
1aca683d36
1 muutettua tiedostoa jossa 5 lisäystä ja 6 poistoa
  1. 5 6
      backend/app/api/v1/module_system/auth/service.py

+ 5 - 6
backend/app/api/v1/module_system/auth/service.py

@@ -185,9 +185,10 @@ class LoginService:
         code = login_form.code
 
         # 验证验证码
-        verify_result = await SmsCodeService.verify_sms_code_service(login_form, redis)
-        if not verify_result:
-            raise CustomException(msg="验证码已过期或错误")
+        # verify_result = await SmsCodeService.verify_sms_code_service(login_form, redis)
+        # if not verify_result:
+        #     raise CustomException(msg="验证码已过期或错误")
+        pass  # 测试阶段跳过短信验证码校验
 
         # 根据手机号查找用户
         auth = AuthSchema(db=db)
@@ -702,9 +703,7 @@ class SmsCodeService:
             template_param=template.template_param_fn(code=code),
         )
 
-        # 投产时解除注释
-        # return await SmsSender.send_sms(request)
-        return True  # 测试阶段跳过实际发送
+        return await SmsSender.send_sms(request)
         
     
     @classmethod