ループバック モデル用の拡張 API を作成しようとしています
以下のドキュメントを使用して、http://docs.strongloop.com/display/LB/Extend+your+API
しかし、 MainReview.count()のようなループバックによって提供されるカスタム関数を使用できません。
module.exports = function(MainReview){
MainReview.greet = function(msg, cb) {
var MainReview = this;
cb(null, 'Greetings... ' + **MainReview.count()** );
}
MainReview.remoteMethod(
'greet',
{
accepts: {arg: 'msg', type: 'Object'},
returns: {arg: 'greeting', type: 'string'}
}
);
};
私はそれをグーグルで試しましたが、助けにはなりませんでした。