You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
296 B
10 lines
296 B
import cachedFetch from "utils/cached-fetch";
|
|
|
|
export default async function handler(req, res) {
|
|
const { lat, lon, apiKey, duration } = req.query;
|
|
|
|
const api_url = `http://api.weatherapi.com/v1/current.json?q=${lat},${lon}&key=${apiKey}`;
|
|
|
|
res.send(await cachedFetch(api_url, duration));
|
|
}
|