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

@ -38,7 +38,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
if (pollErr) return rej('invalid poll param');
const query = {
created_at: {
createdAt: {
$gte: new Date(Date.now() - ms('1days'))
},
repost_count: {
@ -47,15 +47,15 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
} as any;
if (reply != undefined) {
query.reply_id = reply ? { $exists: true, $ne: null } : null;
query.replyId = reply ? { $exists: true, $ne: null } : null;
}
if (repost != undefined) {
query.repost_id = repost ? { $exists: true, $ne: null } : null;
query.repostId = repost ? { $exists: true, $ne: null } : null;
}
if (media != undefined) {
query.media_ids = media ? { $exists: true, $ne: null } : null;
query.mediaIds = media ? { $exists: true, $ne: null } : null;
}
if (poll != undefined) {