Update Notice
Search Optimization - 101222
Searches optimized for restauraunts around the U.S. Prior to this update, the extension was optimized for NY restaurants as a result of the following lines: This line is responsible for indicating the zip code of the restauraunt when searching for it via FourSquare Places API. It uses the first match found on another platform's API
let zipFour = results.yelpResult.businesses[0].location.zip_code;
This line is responsible for getting a matching restaurant. But it had a permanently keyed in location query for NY.
const response = await fetch(`${urlYelp}location=${msg.location},NY&term=${msg.store}`
At first, the address of the restaurant was searched by the user's address which was only a street address. This is why the state of NY was hardcoded into the API call. It has now been determined that the exact address of a restaurant is available in the DOM tree even though a user's required to click 'More Info' to view the address which results in an exact match regardless of what state the user is in.
Log in or sign up for Devpost to join the conversation.