Error: .post() requires callback functions but got a [object Undefined] not working

后端 未结 8 1955
执念已碎
执念已碎 2021-02-04 09:35

there are several issues with the same theme, but I could not solve my problem.

Error: Route.post() requires callback functions but got a [object Undefined]
at R         


        
8条回答
  •  时光取名叫无心
    2021-02-04 10:20

    Instead of this:

    app.post('/user/all',Controller.Create);
    

    You try for:

    app.post('/user/all', function(req, res){
      Controller.Create
    });
    

提交回复
热议问题