Merge pull request 'fix: return image/apng media type from animated card endpoint (#196)' (#204) from issue/196-bug-apng-endpoint-returns-wrong-media-type-image-p into main
This commit is contained in:
commit
c8ec976626
@ -770,7 +770,7 @@ async def get_animated_card(
|
||||
headers = {"Cache-Control": "public, max-age=86400"}
|
||||
|
||||
if os.path.isfile(cache_path) and tier is None:
|
||||
return FileResponse(path=cache_path, media_type="image/png", headers=headers)
|
||||
return FileResponse(path=cache_path, media_type="image/apng", headers=headers)
|
||||
|
||||
all_pos = (
|
||||
CardPosition.select()
|
||||
@ -860,7 +860,7 @@ async def get_animated_card(
|
||||
finally:
|
||||
await page.close()
|
||||
|
||||
return FileResponse(path=cache_path, media_type="image/png", headers=headers)
|
||||
return FileResponse(path=cache_path, media_type="image/apng", headers=headers)
|
||||
|
||||
|
||||
@router.get("/{player_id}/{card_type}card")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user