mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 12:36:57 +00:00
11 lines
350 B
TypeScript
11 lines
350 B
TypeScript
/**
|
|
* 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();
|
|
}
|