feathersjs/feathers-chat

something seems wrong with global hooks

akralj opened this issue · 2 comments

hi,
im copying this projects dir structure for a project of mine and came accross the global hooks in:

exports.myHook = function(options) {

it seems there are not used anywhere, and the export function seems wrong. shouldn't it be module.exports and doesn't it need a next callback, like it is used in the hooks under the services?
have a great day

daffl commented

The exports function should be right but you are correct, it is not used anywhere. Having a callback in a hook is optional and will also be deprecated in the future (instead you can just return a promise as documented here).

thanks, that explains it.