Skip to content

Commit c7aeee3

Browse files
Ace Nassrifhinkel
authored andcommitted
Revert changes to helloHttp (customer feedback) (#1352)
Changes were made in #1232; this reverts them.
1 parent a204dce commit c7aeee3

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

functions/helloworld/index.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,7 @@ exports.helloGET = (req, res) => {
4848
* More info: https://expressjs.com/en/api.html#res
4949
*/
5050
exports.helloHttp = (req, res) => {
51-
const name =
52-
req.query && req.query.name
53-
? req.query.name
54-
: req.body && req.body.name
55-
? req.body.name
56-
: 'World';
57-
res.send(`Hello ${escapeHtml(name)}!`);
51+
res.send(`Hello ${escapeHtml(req.query.name || req.body.name || 'World')}!`);
5852
};
5953
// [END functions_helloworld_http]
6054

0 commit comments

Comments
 (0)