Error handling with get route with mongoose

后端 未结 0 1566
慢半拍i
慢半拍i 2021-01-26 07:25
router.get(\'/:id\', async (req, res) => {
  const course = await Course.findById(req.params.id);
  if (!course) {
    return res.status(400).send(`course id is invai         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题