diff options
Diffstat (limited to 'services/votes/votes.hooks.ts')
-rw-r--r-- | services/votes/votes.hooks.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/services/votes/votes.hooks.ts b/services/votes/votes.hooks.ts new file mode 100644 index 0000000..2e29008 --- /dev/null +++ b/services/votes/votes.hooks.ts @@ -0,0 +1,15 @@ +import { + convertPollHook +} from '../../hooks/convertPoll'; + +import { authenticate } from '@feathersjs/authentication'; + +export default { + before: { + create: [authenticate('jwt')] + }, + after: { + all: [convertPollHook] + } +}; + |