diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-28 16:13:34 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-28 16:13:34 +0300 |
commit | 302a76985cef867f509a4180387cc45e934452d5 (patch) | |
tree | c79d2d95a79a9b452c7161ef0303e873fe7be0c1 /services | |
parent | e63122d84c65f30eb1e063504e7f16a05eb769f1 (diff) | |
download | which-api-302a76985cef867f509a4180387cc45e934452d5.tar.gz |
feat: improve votes
Diffstat (limited to 'services')
-rw-r--r-- | services/votes/votes.hooks.ts | 10 |
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] } }; |