Function returns true value

Hello team,

Wondering if you could help. Every-time I reject a leave request, the script returns true value. Can you please help?

 function doGet(e){
  
  var answer = (e.parameter.approval =='true')? 'Appoved!' :'not approved';
 
   MailApp.sendEmail("xyz@xyz.com","Approved Request", "Your manager said: "+answer);
return
}

return… what? You havent… told it what to return?
Which means this function will return undefined.

My apologies, below is the code. I have created two links – Approve and Reject which appear in the email. Now, when I hit Approve link the script should return the answer as Approved and when I reject, the answer should be ‘Not approved’.

I tried to find where the issue is, unfortunately, unable to. Need help

function sendEmail(e) {
.....
var url ='https://script.google.com/macros/s/***************************************/exec';

var approve = url + '?approval==true'+'?reply='+email;
var reject = url + '?approval==false'+'?reply='+email;


           "<a href ="+ approve +"> Approve</a><br />"+
           "<a href ="+reject+">Reject</a> <br />"+
          "</body>";
          
  MailApp.sendEmail("xyz@xyz.com", "Approval Request", "what no html?", {htmlBody: html});
}

Well, for starters:

too many equals signs.

for second:

URL query strings contain exactly one ?. multiple parameters are separated by ampersands (&).