Skip to content
This repository was archived by the owner on Sep 14, 2022. It is now read-only.

Commit 7593575

Browse files
authored
Update hello_world.js
1 parent b24ccc5 commit 7593575

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

project-skeletons/sails/api/controllers/hello_world.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ module.exports = {
3737
function hello(req, res) {
3838
// variables defined in the Swagger document can be referenced using req.swagger.params.{parameter_name}
3939
var name = req.swagger.params.name.value || 'stranger';
40-
var hello = util.format('{ "message": "Hello, %s!" }', name);
40+
var hello = util.format('Hello, %s!', name);
4141

4242
// this sends back a JSON response which is a single string
43-
res.json(hello);
43+
res.json({ "message": hello });
4444
}

0 commit comments

Comments
 (0)