mirror of
https://github.com/System-End/site.git
synced 2026-04-19 23:22:49 +00:00
18 lines
322 B
JavaScript
18 lines
322 B
JavaScript
export async function getGames() {
|
|
try {
|
|
|
|
let games = await fetch(
|
|
'https://sprig.hackclub.com/api/gallery?new'
|
|
).then(res => res.json())
|
|
|
|
return games
|
|
} catch(e) {
|
|
console.error(e)
|
|
return []
|
|
}
|
|
}
|
|
|
|
export default async function Games(req, res) {
|
|
const games = await getGames()
|
|
res.json(games)
|
|
}
|