Intellij Idea warning - “Promise returned is ignored” with aysnc/await

后端 未结 6 1523
抹茶落季
抹茶落季 2020-12-29 19:02

I\'m using Express.js in my code with Node.js v7.3. In this I\'ve created a User Router which forwards the requests to my User Controlle

6条回答
  •  天涯浪人
    2020-12-29 19:47

    router.post('/login', function (req, res, next) {
        void userController.login(req, res); // I get the warning here
    });

    You should use "void" operator.

提交回复
热议问题