aboutsummaryrefslogtreecommitdiff
path: root/services/votes/votes.hooks.ts
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-22 01:42:43 +0300
committereug-vs <eug-vs@keemail.me>2020-06-22 01:43:27 +0300
commit4909dda29566710793b8445ab4426102ca4a0324 (patch)
treed3bc9a565647c160b7464251f2688bd5455dd674 /services/votes/votes.hooks.ts
parente99b51895afd532a529744396ecae87d47c68503 (diff)
downloadwhich-api-4909dda29566710793b8445ab4426102ca4a0324.tar.gz
feat: create Votes service
Diffstat (limited to 'services/votes/votes.hooks.ts')
-rw-r--r--services/votes/votes.hooks.ts15
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]
+ }
+};
+