/** * TestController * * @description :: Server-side logic for managing tests * @help :: See http://links.sailsjs.org/docs/controllers */module.exports={/** * `TestController.index()` */index:function(req,res){returnres.json({todo:'index() is not implemented yet!'});}};
ここに、このように追加したんですね。そのまんま。
12345678910111213141516171819202122232425262728
/** * TestController * * @description :: Server-side logic for managing tests * @help :: See http://links.sailsjs.org/docs/controllers */module.exports={/** * `TestController.index()` */index:function(req,res){returnres.json({todo:'index() is not implemented yet!'});}test:function(req,res){returnres.json({todo:'index() is not implemented yet!'});}};
module.exports={/** * `TestController.index()` */index:function(req,res){returnres.json({todo:'index() is not implemented yet!'});},test:function(req,res){returnres.json({todo:'index() is not implemented yet!'});}};