Skip to content

Commit

Permalink
refactor: Improve var name. b/131773884 (#1262)
Browse files Browse the repository at this point in the history
* refactor: Improve var name. b/131773884

* Update index.js
  • Loading branch information
grant authored May 6, 2019
1 parent ff4bd3a commit be7d932
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions functions/node8/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,12 @@ exports.helloBackground = (data, context) => {
* This function is exported by index.js, and executed when
* the trigger topic receives a message.
*
* @param {object} data The event payload.
* @param {object} pubSubEvent The event payload.
* @param {object} context The event metadata.
*/
exports.helloPubSub = (data, context) => {
const pubSubMessage = data;
const name = pubSubMessage.data
? Buffer.from(pubSubMessage.data, 'base64').toString()
exports.helloPubSub = (pubSubEvent, context) => {
const name = pubSubEvent.data
? Buffer.from(pubSubEvent.data, 'base64').toString()
: 'World';

console.log(`Hello, ${name}!`);
Expand Down

0 comments on commit be7d932

Please sign in to comment.