Fix Culvers FOTD URL
This commit is contained in:
parent
46735e5c31
commit
35e92304c5
|
@ -35,7 +35,7 @@ vectorLayer.customPopupCallback = async function(feature) {
|
|||
fotd_parent.append(fotd_child, fotd_image);
|
||||
|
||||
const [long, lat] = toLonLat(feature.getGeometry().getCoordinates());
|
||||
const res = await fetch(`https://corsproxy.io/?${encodeURIComponent(`https://www.culvers.com/api/restaurants/getLocations?lat=${lat}&long=${long}&limit=1&t=${Date.now()}`)}`)
|
||||
const res = await fetch(`https://corsproxy.io/?${encodeURIComponent(`https://www.culvers.com/api/locator/getLocations?lat=${lat}&long=${long}&limit=1&t=${Date.now()}`)}`)
|
||||
const res_data = await res.json();
|
||||
fotd_child.innerHTML = res_data.data.geofences[0].metadata.flavorOfDayName;
|
||||
fotd_image.src = `https://cdn.culvers.com/menu-item-detail/${res_data.data.geofences[0].metadata.flavorOfDaySlug}`;
|
||||
|
|
Loading…
Reference in a new issue