diff --git a/examples/v2/cloud_functions/python/cloud_function.yaml b/examples/v2/cloud_functions/python/cloud_function.yaml index 8accf3acf..86401e809 100644 --- a/examples/v2/cloud_functions/python/cloud_function.yaml +++ b/examples/v2/cloud_functions/python/cloud_function.yaml @@ -23,7 +23,7 @@ resources: name: $(ref.function.name) data: | { - "hola": "mundo" + "message": "hola, mundo" } metadata: runtimePolicy: diff --git a/examples/v2/cloud_functions/python/function/index.js b/examples/v2/cloud_functions/python/function/index.js index 0282f3fd6..0d0b6273c 100644 --- a/examples/v2/cloud_functions/python/function/index.js +++ b/examples/v2/cloud_functions/python/function/index.js @@ -5,7 +5,8 @@ * @param {Object} res Cloud Function response context. */ exports.handler = function(req, res) { - console.log(req.body.message); + const { message } = req.body; + console.log(message); res.status(200).send( - {hello: 'world', time: new Date(), codeHash: process.env.codeHash}); + {hello: 'world', message, time: new Date(), codeHash: process.env.codeHash}); };