aboutsummaryrefslogtreecommitdiff
path: root/services/votes
diff options
context:
space:
mode:
authorEugene Sokolov <eug-vs@keemail.me>2020-06-28 19:01:52 +0300
committerGitHub <noreply@github.com>2020-06-28 19:01:52 +0300
commit88e97a42096c1e4de7b9f1d8fefa0829bbc0d321 (patch)
treeae402f77d0d0d7b8d06dcefc614bbb9aad12ed59 /services/votes
parent8baf96be5ea7880cebe3aeda733b9196950be434 (diff)
parent29197dd3bc7e941707979b6c226e5f3b1a4cbbed (diff)
downloadwhich-api-88e97a42096c1e4de7b9f1d8fefa0829bbc0d321.tar.gz
Merge pull request #16 from which-ecosystem/feedback
Feedback endpoint & schema updates
Diffstat (limited to 'services/votes')
-rw-r--r--services/votes/votes.hooks.ts10
1 files changed, 2 insertions, 8 deletions
diff --git a/services/votes/votes.hooks.ts b/services/votes/votes.hooks.ts
index 7d0b3ba..56e9000 100644
--- a/services/votes/votes.hooks.ts
+++ b/services/votes/votes.hooks.ts
@@ -1,15 +1,9 @@
-import { HookContext } from '@feathersjs/feathers';
import requireAuth from '../../hooks/requireAuth';
-
-const addUserId = async (context: HookContext): Promise<HookContext> => {
- const { params: { user } } = context;
- context.data.userId = user._id;
- return context;
-};
+import signAuthority from '../../hooks/signAuthority';
export default {
before: {
- create: [requireAuth, addUserId]
+ create: [requireAuth, signAuthority]
}
};