express-mongoose-es6-rest-api icon indicating copy to clipboard operation
express-mongoose-es6-rest-api copied to clipboard

Warning: a promise was created in a handler

Open duard opened this issue 8 years ago • 0 comments

I'm getting this warning on that RETURN

Warning: a promise was created in a handler at home/carlos/subdev/api-duard/dist/server/api/usuarios.ctrl.js:24:12 but was not returned from it, see http://goo.gl/rRqMUw
    at new Promise (/home/carlos/subdev/api-duard/node_modules/bluebird/js/release/promise.js:77:14)
at this line 

/**
 * Get user
 * @returns {User}
 */
function get(req, res) {
  **return** res.json(req.user);
}

duard avatar Apr 17 '17 17:04 duard