fix(excel):change
This commit is contained in:
@@ -23,9 +23,8 @@ async def validate_token(_input: ValidateTokenInput):
|
||||
_cache_auth = await redis_get(f'{conf.auth.cache_prefix_key}{_cache_key}', conf.database.get('auth_redis'))
|
||||
if not _cache_auth:
|
||||
client = httpx.AsyncClient()
|
||||
headers = {'Content-Type': 'application/json', }
|
||||
|
||||
result = await client.request('POST', conf.auth.url, json=_input.dict(), headers=headers)
|
||||
headers = {'Content-Type': 'application/json', 'Authorization':'Bearer '+_input.token}
|
||||
result = await client.request('GET', conf.auth.url, json=_input.dict(), headers=headers)
|
||||
export = result.text
|
||||
if 'application/json' in result.headers['content-type']:
|
||||
export = result.json()
|
||||
@@ -35,6 +34,7 @@ async def validate_token(_input: ValidateTokenInput):
|
||||
|
||||
if 'v2' in conf.auth.url:
|
||||
export = export.get('data')
|
||||
print(export)
|
||||
|
||||
await redis_set(f'{conf.auth.cache_prefix_key}{_cache_key}', export, conf.database.get('auth_redis'),
|
||||
ex=conf.auth.cache_ttl)
|
||||
|
||||
Reference in New Issue
Block a user