2014-11-22 27 views

回答

5

我想通了,我可以用普通的方式添加一個新的遠程方法。

loopback.remoteMethod(
      UserModel.prototype.getFollows, 
      { 
       description: 'Get the users who are followed by the user', 
       accepts: [ 
        {arg: 'page', type: 'Number', http: {source: 'query'}, required: true} 
       ], 
       returns: {arg: 'data', type: 'object'}, 
       http: {verb: 'get', path: '/follows'}, 
       isStatic: false, 
      } 
    ); 
+0

回答http://stackoverflow.com/a/37698420/928763 – Firdous 2016-06-08 09:27:45

相關問題