I'm following the tutorial. In Asynchronous hooks
, there's a snippet like this:
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;
});
}
});
Would you please let me know what this.find()
is supposed to do?