Open
Description
A lot of hooks are to be used as before OR after hooks while they could be used in both cases. This is mostly due to the fact that we directly access data
or result
on the hook object instead of using the generic Feathers utility functions getItems()/replaceItems()
.
We recently introduced callOnHookItems() to apply a given function on hook items to support such use cases. It should be used whenever possible.
Moreover hooks reading/writing data like readJson/writeJson
are writing/reading data to/from a default path like result.data
, which is not aware of the type of the hook. The data path should adapt itself to be more easy to use, eg data.data
in a before hook and result.data
in an after hook.
Metadata
Metadata
Assignees
Type
Projects
Status
Stand-by