我在跟踪本教程。在Asynchronous hooks中,有这样一个片段:
todoService.before({
find(hook) {
return this.find().then(data => {
hook.params.message = 'Ran through promise hook';
hook.data.result = data;
// Always return the hook object
return hook;
});
}
});你能告诉我this.find()该怎么做吗?
发布于 2016-05-11 07:24:06
find是羽毛服务方法,this是钩子正在运行的服务。
https://stackoverflow.com/questions/37152839
复制相似问题