backend/api/timerRouter.js
// for demo purposes, this function will not be run inside fireSMS and the example url is hard-coded in the .env file
for demo purposes, this function will not be run inside fireSMS and the example url is hard-coded in the .env file
for demo purposes this function will not be run inside fireSMS and the example url is hard - coded in the . env file
function retrieveUrl(user) {
  const colors = ["blue", "green", "yellow", "red"];
  let gmapUrl =
    "https://maps.googleapis.com/maps/api/staticmap?&size=300x300&scale=2&maptype=hybrid&";
  user.events.geoData.forEach((point, index) => {
    gmapUrl += `markers=color:${colors[index]}%7C${point}&`;
  });
  gmapUrl += `key=${process.env.GOOGLE_MAP_API_KEY}`;
  return gmapUrl;
}
function retrieveUrl ( user ) { const colors = [ "blue" , "green" , "yellow" , "red" ] ; let gmapUrl = "https://maps.googleapis.com/maps/api/staticmap?&size=300x300&scale=2&maptype=hybrid&" ; user . events . geoData . forEach ( ( point , index ) => { gmapUrl += ` ${ colors [ index ] } ${ point } ` ; } ) ; gmapUrl += ` ${ process . env . GOOGLE_MAP_API_KEY } ` ; return gmapUrl ; }
for demo purposes, this function will not be run inside fireSMS and the example url is hard-coded in the .env file
for demo purposes this function will not be run inside fireSMS and the example url is hard - coded in the . env file