title: Sails JS helpers error resolving/ rejecting
body: <p>I am using Helpers in Sails for login.
  This is my <strong>helpers/login.js</strong>:</p>
  
  <pre><code>  fn: async function (inputs, exits) {
      const password = inputs.password;
      const email = inputs.email;
  
      // find user with email
      const user = await User.findOne({email});
      if (user){
        const salt = user.salt;
        const hashedPass = user.password;
        const iterations = user.iterations;
  
        // check if input password matches with password in DB
        crypto.pbkdf2(password, salt, iterations, 64, 'sha512',
          (err, key) =&gt; {
            if (!err) {
              if (hashedPass === key.toString('hex')) {
                // password matched
                return exits.success({code: 200});
              }
  
            }
          });
      }
      // account not found or password doesnt match
      return exits.success({code: 404});
  
  
    }
  </code></pre>
  
  <p><strong>UserController.js</strong>:</p>
  
  <pre><code>login: async function(req, res){
      let loginUser;
      try {    
        loginUser = await sails.helpers.login.with({
          email: req.body.email, password: req.body.password
        });
  
  
      } catch (e) {
        console.log("Error login in usercontroller ", e.message);
        return res.serverError();
      }
  
      if (loginUser.code == 200) {
        return res.ok();
  
      }else {
        return res.serverError();
      }
  
    }
  </code></pre>
  
  <p>The problem lies in the Helper when I have the <strong>right</strong> <strong>email</strong> and <strong>password</strong> it's meant to return a <code>code: 200</code> although it returns <code>code: 404</code>. With error message from node: </p>
  
  <pre><code>WARNING: Something seems to be wrong with this function.
  It is trying to signal that it has finished AGAIN, after
  already resolving/rejecting once.
  (silently ignoring this...)
  </code></pre>
  
  <p>, same when I input wrong username/ email it returns that message. But when I remove <code>return exits.success({code: 404})</code> and input right email and password, it returns the right code (200). I need help fixing it.</p>