mirror of
https://github.com/System-End/site.git
synced 2026-04-19 23:22:49 +00:00
8 lines
274 B
JavaScript
8 lines
274 B
JavaScript
export default async function getGames(req, res) {
|
|
let games = await fetch(
|
|
'https://editor.sprig.hackclub.com/metadata.json'
|
|
).then(res => res.json())
|
|
games = games.sort((a, b) => new Date(b.addedOn) - new Date(a.addedOn)).slice(0, 4)
|
|
|
|
return res.json(games)
|
|
}
|