diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-22 01:42:43 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-22 01:43:27 +0300 |
commit | 4909dda29566710793b8445ab4426102ca4a0324 (patch) | |
tree | d3bc9a565647c160b7464251f2688bd5455dd674 /services/votes/votes.hooks.ts | |
parent | e99b51895afd532a529744396ecae87d47c68503 (diff) | |
download | which-api-4909dda29566710793b8445ab4426102ca4a0324.tar.gz |
feat: create Votes service
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] + } +}; + |