From 6691244efbefaaea060dfe5d1e35706d121e7e8c Mon Sep 17 00:00:00 2001 From: chenyumic Date: Wed, 3 Apr 2019 05:47:53 -0700 Subject: [PATCH] fix(deps): update dependency pubsub to ^0.28 (#1231) --- appengine/pubsub/app.js | 4 ++-- appengine/pubsub/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/appengine/pubsub/app.js b/appengine/pubsub/app.js index 2a0efd553a..2db58a7823 100644 --- a/appengine/pubsub/app.js +++ b/appengine/pubsub/app.js @@ -46,7 +46,7 @@ const messages = []; const PUBSUB_VERIFICATION_TOKEN = process.env.PUBSUB_VERIFICATION_TOKEN; const TOPIC = process.env.PUBSUB_TOPIC; -const publisher = pubsub.topic(TOPIC).publisher(); +const topic = pubsub.topic(TOPIC); // [START gae_flex_pubsub_index] app.get('/', (req, res) => { @@ -61,7 +61,7 @@ app.post('/', formBodyParser, async (req, res, next) => { const data = Buffer.from(req.body.payload); try { - const messageId = await publisher.publish(data); + const messageId = await topic.publish(data); res.status(200).send(`Message ${messageId} sent.`); } catch (error) { next(error); diff --git a/appengine/pubsub/package.json b/appengine/pubsub/package.json index b77aaab5ce..e3783b51c5 100644 --- a/appengine/pubsub/package.json +++ b/appengine/pubsub/package.json @@ -13,7 +13,7 @@ "test": "repo-tools test app && mocha */*.test.js --timeout=30000 --exit" }, "dependencies": { - "@google-cloud/pubsub": "^0.22.0", + "@google-cloud/pubsub": "^0.28.0", "body-parser": "^1.18.3", "express": "^4.16.3", "pug": "^2.0.1",