Skip to content

Commit da76bb1

Browse files
committed
fix: signAuthority on creating poll
1 parent 88e97a4 commit da76bb1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

services/polls/polls.hooks.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Poll } from 'which-types';
66
import { PollSchema } from '../../models/polls/poll.schema';
77
import VoteModel from '../../models/votes/vote.model';
88
import sortByDate from '../../hooks/sortByDate';
9+
import signAuthority from '../../hooks/signAuthority';
910

1011

1112
const convertPoll = async (context: HookContext): Promise<HookContext> => {
@@ -44,7 +45,8 @@ const convertPoll = async (context: HookContext): Promise<HookContext> => {
4445

4546
export default {
4647
before: {
47-
find: sortByDate
48+
find: sortByDate,
49+
create: signAuthority
4850
},
4951
after: {
5052
all: convertPoll

0 commit comments

Comments
 (0)