title: Using multiple functions on SailsJS paths
body: <p>I'm migrating a project to Sails.js, I decided use Sails because I need to chaing many functions to single path and in it's documentation sais it is posible but I tryed a single example and I can not make it works, when I try to execute two functions on a path i got this error:</p>
  
  <blockquote>
    <p>Error: <code>next</code> (as in req,res,next) should never be called in an action function (but in action <code>algo/fn1</code>, it was!)  It was called with no arguments.  Please use a method like <code>res.ok()</code> or <code>res.json()</code> instead.</p>
  </blockquote>
  
  <p>What am I doing wrong or how can I make it works?
  this is my code:</p>
  
  <p>routes.js</p>
  
  <pre><code>// ...
  'get /chain': [
      'AlgoController.fn1',
      'AlgoController.fn2'
  ],
  // ...
  </code></pre>
  
  <p>AlgoController.js</p>
  
  <pre><code>let Controller = {};
  Controller.fn1 = function(req, res, next) {
  
      req.executed = ['executed fn1'];
      next();
  };
  
  Controller.fn2 = function(req, res, next) {
  
      req.executed.push('executed fn2');
      res.send(req.executed.join(' and '));
  };
  
  module.exports = Controller;
  </code></pre>
  
  <p>If I delete the next() or use res.ok() / res.json(), the second function is never executed.</p>