Skip to content

Commit

Permalink
Removing $return for httpTriggers for 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
soninaren committed Nov 14, 2016
1 parent fec1526 commit 13332af
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Templates/HttpTrigger-CSharp/function.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"direction": "in"
},
{
"name": "$return",
"name": "res",
"type": "http",
"direction": "out"
}
Expand Down
2 changes: 1 addition & 1 deletion Templates/HttpTrigger-JavaScript/function.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"type": "http",
"direction": "out",
"name": "$return"
"name": "res"
}
]
}
8 changes: 4 additions & 4 deletions Templates/HttpTrigger-JavaScript/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
module.exports = function (context, req) {
module.exports = function(context, req) {
context.log('JavaScript HTTP trigger function processed a request.');

if (req.query.name || (req.body && req.body.name)) {
res = {
context.res = {
// status: 200, /* Defaults to 200 */
body: "Hello " + (req.query.name || req.body.name)
};
}
else {
res = {
context.res = {
status: 400,
body: "Please pass a name on the query string or in the request body"
};
}
context.done(null, res);
context.done();
};

0 comments on commit 13332af

Please sign in to comment.