feathersjs / feathers

The API and real-time application framework
https://feathersjs.com
MIT License
14.97k stars 742 forks source link

Hooks should run on non-enabled methods #3457

Open AshotN opened 2 months ago

AshotN commented 2 months ago

Steps to reproduce

Discord discussion

https://codesandbox.io/p/devbox/feathers-custom-service-hooks-8m28r3?file=%2Fsrc%2Fapp.ts%3A27%2C22

export const customMethods = ['enabledMethod'] as const ... //BEFORE ALL is called with this app.service('custom').enabledMethod() //But not this app.service('custom').notEnabledMethod()

Expected behavior

Ideally hooks should run on all methods

Actual behavior

Hooks are only ran on enabled methods