mirror of
https://github.com/TheSmallHanCat/flow2api.git
synced 2026-06-07 17:20:09 +08:00
feat: 无头打码与YesCaptcha打码
This commit is contained in:
@@ -839,10 +839,12 @@ async def update_captcha_config(
|
||||
token: str = Depends(verify_admin_token)
|
||||
):
|
||||
"""Update captcha configuration"""
|
||||
captcha_method = request.get("captcha_method")
|
||||
yescaptcha_api_key = request.get("yescaptcha_api_key")
|
||||
yescaptcha_base_url = request.get("yescaptcha_base_url")
|
||||
|
||||
await db.update_captcha_config(
|
||||
captcha_method=captcha_method,
|
||||
yescaptcha_api_key=yescaptcha_api_key,
|
||||
yescaptcha_base_url=yescaptcha_base_url
|
||||
)
|
||||
@@ -858,6 +860,7 @@ async def get_captcha_config(token: str = Depends(verify_admin_token)):
|
||||
"""Get captcha configuration"""
|
||||
captcha_config = await db.get_captcha_config()
|
||||
return {
|
||||
"captcha_method": captcha_config.captcha_method,
|
||||
"yescaptcha_api_key": captcha_config.yescaptcha_api_key,
|
||||
"yescaptcha_base_url": captcha_config.yescaptcha_base_url
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user