I have a simple function that logs the body text. The body is some simple JSON which I am including in the POST dialog on the appwrite console for executing the function. The log statements return undefined.
module.exports = async function (context) {
try {
console.log(context.req.bodyText);
console.log(context.req.bodyJson);
} catch (error) {
console.error("Error:", error.message);
}
return {};
};