How to send back a usable response from a custom module?

I have a simple custom module which adds 2 numbers and returns back their sum. I want to receive this sum as a response.

JS
exports.responseSender = function (options) {
options = this.parse(options);
const a = options.firstNumber;
const b = options.secondNumber;
return this.parse(a + b);
}

HJSON
{
type:“responseSender”,
module:“responseSender”,
action:“responseSender”,
groupTitle:“Custom Actions”,
groupIcon:“fas fa-lg fa-database comp-data”,
title:“Response Sender”,
icon:“fas fa-lg fa-table comp-data”,
dataPickObject: true,
properties:[
{
group:“Stripe Checkout Properties”,
variables:[
{
name:“firstNumber”,
optionName:“firstNumber”,
title:“First Number”,
type:“number”,
required:true,
defaultValue:"",
},
{
name:“secondNumber”,
optionName:“secondNumber”,
title:“Second Number”,
type:“number”,
required:true,
defaultValue:"",
},
]
}
]
}

I am in need of a solution for this,

Thank you

Hi.
If you look at some of the other examples on custom modules, you would note that the reponse expected is JSON.
So, you need to just wrap your result in a JSON object to make it usable.

I’ve tried your method, it didn’t work.

But if you wrap the result in “this.res.send” it works.