diff --git a/blocks/moredetailsaddress/moredetailsaddress.js b/blocks/moredetailsaddress/moredetailsaddress.js index a4bb1f0d9..2b78a34e0 100644 --- a/blocks/moredetailsaddress/moredetailsaddress.js +++ b/blocks/moredetailsaddress/moredetailsaddress.js @@ -161,8 +161,17 @@ function returnLatLan() { }); } -async function getReviewRating(placeID) { - const response = await fetchAPI("GET", `/content/piramalfinance/api/mapapi.json?place_id=${placeID}&key=${GOOGLE_MAPS_API_KEY}`); +async function getReviewRating(placeIDs) { + let requestObj = { + requestJson : { + placeIds: "", + googleKey : "" + } + }; + requestObj.requestJson.placeIds = placeIDs; + requestObj.requestJson.googleKey = GOOGLE_MAPS_API_KEY; + const response = await fetchAPI("POST", '/content/piramalfinance/api/mapapi.json', requestObj); + // const response = await fetchAPI("GET", `/content/piramalfinance/api/mapapi.json?place_id=${placeID}&key=${GOOGLE_MAPS_API_KEY}`); // const response = await fetchAPI("GET", `https://maps.googleapis.com/maps/api/place/details/json?place_id=${placeID}&key=${GOOGLE_MAPS_API_KEY}`); return response.json(); }