aboutsummaryrefslogtreecommitdiff
path: root/services/votes/votes.service.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.service.ts
parente99b51895afd532a529744396ecae87d47c68503 (diff)
downloadwhich-api-4909dda29566710793b8445ab4426102ca4a0324.tar.gz
feat: create Votes service
Diffstat (limited to 'services/votes/votes.service.ts')
-rw-r--r--services/votes/votes.service.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/services/votes/votes.service.ts b/services/votes/votes.service.ts
new file mode 100644
index 0000000..3947d9b
--- /dev/null
+++ b/services/votes/votes.service.ts
@@ -0,0 +1,10 @@
+import { Application } from '@feathersjs/express';
+import Votes from './votes.class';
+
+import hooks from './votes.hooks';
+
+export default (app: Application): void => {
+ app.use('/polls/:id/votes/', new Votes());
+ app.service('/polls/:id/votes/').hooks(hooks);
+};
+