edit var names

This commit is contained in:
madarsbiss
2021-10-27 13:38:28 +03:00
parent 88b4db25a2
commit 2737427b6f
7 changed files with 48 additions and 48 deletions

View File

@@ -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);