edit var names
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
export default async function handler(req, res) {
|
||||
const { input } = req.body;
|
||||
const { cityInput } = req.body;
|
||||
const getWeatherData = await fetch(
|
||||
`https://api.openweathermap.org/data/2.5/weather?q=${input}&units=metric&appid=${process.env.OPENWEATHER_API_KEY}`
|
||||
`https://api.openweathermap.org/data/2.5/weather?q=${cityInput}&units=metric&appid=${process.env.OPENWEATHER_API_KEY}`
|
||||
);
|
||||
const data = await getWeatherData.json();
|
||||
res.status(200).json(data);
|
||||
|
||||
Reference in New Issue
Block a user