我正在关注教程。在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()
应该怎么做吗?