Dawdre / death-roll

https://death-roll.vercel.app
0 stars 0 forks source link

Fix the recent matches API to no longer point to old avatars that were cleaned up by the cleanup process #21

Open Ashyy-code opened 4 months ago

Ashyy-code commented 4 months ago

When a user updates their avatar, the following day the unused avatar cleanup process will now successfully remove that old unused avatar to save disk space.

However the match history saves the avatar at the time of playing, leading to the "Recent Matches" api bringing back avatars that no longer work.

Ash to alter the recentMatches endpoint to ensure the winneravatar property is the current live avatar of the winner, and not the snapshot of the avatar they were using at the time to prevent broken images after avatar cleanup.