1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-06-09 06:44:01 +02:00
This commit is contained in:
syuilo
2018-03-28 16:39:14 +09:00
parent 7d4d9dbaa6
commit 3d5cdb8d2d
237 changed files with 1661 additions and 1354 deletions

View File

@@ -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: {