登录关闭验证码验证
This commit is contained in:
parent
580fd8f16b
commit
806006a218
@ -26,12 +26,15 @@ async def login(
|
||||
request: Request, form_data: CustomOAuth2PasswordRequestForm = Depends(), query_db: AsyncSession = Depends(get_db)
|
||||
):
|
||||
# 是否启用验证码
|
||||
captcha_enabled = (
|
||||
True
|
||||
if await request.app.state.redis.get(f'{RedisInitKeyConfig.SYS_CONFIG.key}:sys.account.captchaEnabled')
|
||||
== 'true'
|
||||
else False
|
||||
)
|
||||
# captcha_enabled = (
|
||||
# True
|
||||
# if await request.app.state.redis.get(f'{RedisInitKeyConfig.SYS_CONFIG.key}:sys.account.captchaEnabled')
|
||||
# == 'true'
|
||||
# else False
|
||||
# )
|
||||
|
||||
captcha_enabled =False
|
||||
|
||||
user = UserLogin(
|
||||
userName=form_data.username,
|
||||
password=form_data.password,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user