feat(api): weather endpoint

This commit is contained in:
mikhail "synzr" 2025-12-02 09:48:09 +05:00
parent c9ef692c9a
commit 4593298fce

View file

@ -0,0 +1,15 @@
import fetchWeather from "$lib/clients/weather";
import { json } from "@sveltejs/kit";
// NOTE: Magnitogorsk, Russian Federation
const WEATHER_LAT = 53.40716;
const WEATHER_LON = 58.980289;
export async function GET() {
return json(
await fetchWeather(WEATHER_LAT, WEATHER_LON),
{
headers: new Headers({ 'cache-control': 'max-age=600' }),
},
);
}