feathers-hooks-common
feathers-hooks-common copied to clipboard
Useful hooks for use with FeathersJS services.
### Steps to reproduce Setup the hook like this on a service: ``` before: { patch: [preventChanges(true, ['quotas'])] } ``` ### Expected behavior If `quotas` is actually a nested object...
### Steps to reproduce Use this hook in a before patch. Try to patch several records with arbitrary data and specify some params to query those records. Verify context.params do...
### Steps to reproduce Problem: Pagination is a pain. It is so much of an ugly pain the [pagination docs](https://feathersjs.com/api/databases/common.html#pagination), don't ever try iterating over paginated results, instead showing how...
### Summary Adds a hook named next. It attaches an iterator named next to paginated results to improve pagination ergonomics. https://github.com/feathersjs-ecosystem/feathers-hooks-common/issues/717
all this hooks fails if you use an around hook, why ? because this lib is modifying the context and feathers don't want that. this should be avoid : return...
Use regular hooks in around with `beforeAround` & `afterAround`: ```ts import { beforeAround } from 'feathers-hooks-common'; service.hooks({ around: { find: [ beforeAround((context) => { // do whatever you need to...
I think we should update the docs to include an example of how one might use the `paramsForServer` as a hook. ```js const paramsForServerHook = (...whitelist) => (context) => {...
Is there a way to use the [`softDelete`](https://hooks-common.feathersjs.com/hooks.html#softdelete) hook for batch requests? I found out deleting multiple records at once via batch remove does nothing, the workaround is simply making...
Hello, Thanks for the awesome library. SetField works well to handle authorizations when current userID is in the table. Let's say I have a many to many relation such as...
### Steps to reproduce - Create a new Feathers App with a Service using a Database adapter that supports `$push` (e.g. mongodb, mongoose) - Use `preventChanges(true, 'roles')` to prevent changes...