From 1b5e7467a45ce0677ee47b1e94acf6119c0dabdb Mon Sep 17 00:00:00 2001 From: Ace Nassri Date: Mon, 23 Jul 2018 14:09:25 -0700 Subject: [PATCH] Tips: add region tags (#696) * Add terminate region tag * Massage terminate region tag --- functions/helloworld/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions/helloworld/index.js b/functions/helloworld/index.js index 19652ad76d..6847e2b3ed 100644 --- a/functions/helloworld/index.js +++ b/functions/helloworld/index.js @@ -38,11 +38,14 @@ exports.helloGET = (req, res) => { * @param {Object} req Cloud Function request context. * @param {Object} res Cloud Function response context. */ +// [START functions_tips_terminate] exports.helloHttp = (req, res) => { res.send(`Hello ${req.body.name || 'World'}!`); }; // [END functions_helloworld_http] +// [END functions_tips_terminate] + // [START functions_helloworld_background] /** * Background Cloud Function. @@ -50,9 +53,11 @@ exports.helloHttp = (req, res) => { * @param {object} event The Cloud Functions event. * @param {function} callback The callback function. */ +// [START functions_tips_terminate] exports.helloBackground = (event, callback) => { callback(null, `Hello ${event.data.name || 'World'}!`); }; +// [END functions_tips_terminate] // [END functions_helloworld_background] // [START functions_helloworld_pubsub]