Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Improve var name. b/131773884 #1262

Merged
merged 2 commits into from
May 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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