We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69b2121 commit 8f5f077Copy full SHA for 8f5f077
services/feed/feed.hooks.ts
@@ -1,6 +1,7 @@
1
import _ from 'lodash';
2
import { HookContext } from '@feathersjs/feathers';
3
-
+import { iff, combine } from 'feathers-hooks-common';
4
+import isAuthenticated from '../../hooks/isAuthenticated';
5
6
const raiseNewVerifedPolls = async (context: HookContext): Promise<HookContext> => {
7
// Raise unseen verified polls to the very top
@@ -22,7 +23,10 @@ const lowerOldPolls = async (context: HookContext): Promise<HookContext> => {
22
23
24
export default {
25
after: {
- find: [raiseNewVerifedPolls, lowerOldPolls]
26
+ find: [
27
+ iff(isAuthenticated, raiseNewVerifedPolls),
28
+ iff(isAuthenticated, lowerOldPolls),
29
+ ]
30
}
31
};
32
0 commit comments