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

后端 未结 6 1522
抹茶落季
抹茶落季 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:46

    another way to get rid of the warning is defining an empty then():

    userController.login(req, res); // <- Get the warning here

    userController.login(req, res).then(); // <- No warning

提交回复
热议问题