diff --git a/src/routes/games/getGames.ts b/src/routes/games/getGames.ts index cdbdf13..d0f57d6 100644 --- a/src/routes/games/getGames.ts +++ b/src/routes/games/getGames.ts @@ -82,6 +82,11 @@ export const getGames = async ( }); const games = await Promise.all(rootLocations); + games.sort((a, b) => { + const dateA = new Date(a.lastUploaded); + const dateB = new Date(b.lastUploaded); + return dateB.getTime() - dateA.getTime(); + }); response = new Response( JSON.stringify({