aboutsummaryrefslogtreecommitdiff
path: root/services/feed/feed.hooks.ts
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/feed/feed.hooks.ts
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/feed/feed.hooks.ts')
-rw-r--r--services/feed/feed.hooks.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/feed/feed.hooks.ts b/services/feed/feed.hooks.ts
index 54f6d61..6bff8dc 100644
--- a/services/feed/feed.hooks.ts
+++ b/services/feed/feed.hooks.ts
@@ -7,7 +7,7 @@ const raiseNewVerifedPolls = async (context: HookContext): Promise<HookContext>
// Raise unseen verified polls to the very top
context.result = _.sortBy(
context.result,
- poll => !(poll.author.verified && !poll.userChoice)
+ poll => !(poll.author.verified && !poll.vote)
);
return context;
};
@@ -16,7 +16,7 @@ const lowerOldPolls = async (context: HookContext): Promise<HookContext> => {
// Move all seen polls down
context.result = _.sortBy(
context.result,
- poll => !!poll.userChoice
+ poll => !!poll.vote
);
return context;
};