feathersjs-ecosystem / feathers-hooks-common

Useful hooks for use with FeathersJS services.
https://hooks-common.feathersjs.com
MIT License
193 stars 89 forks source link

Dove before after around utils #705

Open fratzinger opened 1 year ago

fratzinger commented 1 year ago

Use regular hooks in around with beforeAround & afterAround:

import { beforeAround } from 'feathers-hooks-common';

service.hooks({
  around: {
    find: [
      beforeAround((context) => {
        // do whatever you need to do
      }),
      // other around hooks
    ]
  }
});