Skip to content

Commit

Permalink
Update URL to make calls from rendered server instead of local server
Browse files Browse the repository at this point in the history
  • Loading branch information
chardayneal committed Dec 6, 2024
1 parent b530f1f commit e997fe1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const isValidCityName = (cityName) => {

const getCoordinates = async (cityName) => {
try {
const response = await axios.get(`http://127.0.0.1:5000/location?q=${cityName}`);
const response = await axios.get(`https://ada-weather-report-proxy-server.onrender.com//location?q=${cityName}`);
const firstMatch = response.data.length > 0 ? response.data[0] : null;

if (firstMatch) {
Expand All @@ -135,7 +135,7 @@ const getCoordinates = async (cityName) => {

const getWeather = async ({ lat, lon }) => {
try {
const response = await axios.get(`http://127.0.0.1:5000/weather?lat=${lat}&lon=${lon}`);
const response = await axios.get(`https://ada-weather-report-proxy-server.onrender.com/weather?lat=${lat}&lon=${lon}`);
return response.data;
} catch (error) {
logError('Error fetching weather for coordinates:', { coordinates: { lat, lon }, message: error.message, });
Expand Down

0 comments on commit e997fe1

Please sign in to comment.