Skip to content

Commit

Permalink
Bug fix minor
Browse files Browse the repository at this point in the history
  • Loading branch information
codergautam committed Nov 16, 2024
1 parent b8089cb commit 5163e91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ app.get('/countryLocations/:country', (req, res) => {

if(countryLocations[req.params.country].cacheUpdate && Date.now() - countryLocations[req.params.country].cacheUpdate < 60 * 1000) {
console.log('Serving countryLocations from cache');
return res.json({ ready: countryLocations[req.params.country].locations>0, locations: countryLocations[req.params.country].locations });

return res.json({ ready: countryLocations[req.params.country].locations.length>0, locations: countryLocations[req.params.country].locations });
} else {

fetch('http://localhost:3003/countryLocations/'+req.params.country)
Expand Down

0 comments on commit 5163e91

Please sign in to comment.