map legend

This commit is contained in:
Owen Rees
2023-06-06 10:25:14 +02:00
parent b28510b63d
commit 5396df5d2b
6 changed files with 108 additions and 74 deletions
+10
View File
@@ -0,0 +1,10 @@
/**
* Retrieves tournament data from /api/tournaments/:country
* @remarks The result is cached for the revalidation period in seconds
*/
export default async function getTournaments(country: string) {
const res = await fetch(`http://localhost:3000/api/tournaments/${country}`, {
next: { revalidate: 300 },
});
return await res.json();
}