且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

loopbackjs-findById需要id参数

更新时间:2023-11-16 15:47:52

使用get动词时,没有身体.

With get verb, there is no body.

您需要像这样更改远程方法:

You need to change the remote method like this :

 accepts: {arg: 'id', type: 'number', http: { source: 'path' } },
       http: {
          path: '/list/:id',
          verb: 'get'
       }