summaryrefslogtreecommitdiff
path: root/src/api/endpoints/posts/polls/recommendation.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-28 16:39:14 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-28 16:39:14 +0900
commit3d5cdb8d2d60932caf1d29b0581c7d6243e06e37 (patch)
tree9c29d1062b08378d4c4cafe5976793616d45bc01 /src/api/endpoints/posts/polls/recommendation.ts
parentwip (diff)
downloadsharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.tar.gz
sharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.tar.bz2
sharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.zip
wip
Diffstat (limited to 'src/api/endpoints/posts/polls/recommendation.ts')
-rw-r--r--src/api/endpoints/posts/polls/recommendation.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/endpoints/posts/polls/recommendation.ts b/src/api/endpoints/posts/polls/recommendation.ts
index 4a3fa3f55e..19ef0975fa 100644
--- a/src/api/endpoints/posts/polls/recommendation.ts
+++ b/src/api/endpoints/posts/polls/recommendation.ts
@@ -23,22 +23,22 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
// Get votes
const votes = await Vote.find({
- user_id: user._id
+ userId: user._id
}, {
fields: {
_id: false,
- post_id: true
+ postId: true
}
});
- const nin = votes && votes.length != 0 ? votes.map(v => v.post_id) : [];
+ const nin = votes && votes.length != 0 ? votes.map(v => v.postId) : [];
const posts = await Post
.find({
_id: {
$nin: nin
},
- user_id: {
+ userId: {
$ne: user._id
},
poll: {