mirror of
https://github.com/PaiGramTeam/luoxu-api-pub.git
synced 2024-11-21 22:58:21 +00:00
fix a bug
This commit is contained in:
parent
c1abdf89ee
commit
c638ccdbcf
2
main.py
2
main.py
@ -78,7 +78,7 @@ async def get_names(request: Request):
|
||||
async def read_avatar(avatar: str):
|
||||
async with AsyncClient(timeout=60) as client:
|
||||
r = await client.get(f"{local_api}avatar/{avatar}")
|
||||
if r.status_code:
|
||||
if r.status_code == 307:
|
||||
return RedirectResponse(url=ghost_url)
|
||||
return StreamingResponse(r.aiter_bytes(), media_type="image/png")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user