Skip to content

Commit

Permalink
chore(functions/pubsub): use consistent param names (#1997)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ace Nassri authored Oct 8, 2020
1 parent 1e1dfb3 commit f4db908
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions functions/pubsub/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ const pubsub = new PubSub();
exports.publish = async (req, res) => {
if (!req.body.topic || !req.body.message) {
res
.status(500)
.status(400)
.send(
'Missing parameter(s); include "topic" and "subscription" properties in your request.'
'Missing parameter(s); include "topic" and "message" properties in your request.'
);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions functions/pubsub/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ describe('functions/pubsub', () => {
json: true,
});

assert.strictEqual(response.statusCode, 500);
assert.strictEqual(response.statusCode, 400);
assert.strictEqual(
response.body,
'Missing parameter(s); include "topic" and "subscription" properties in your request.'
'Missing parameter(s); include "topic" and "message" properties in your request.'
);
});

Expand Down

0 comments on commit f4db908

Please sign in to comment.