mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-02-04 13:50:20 -07:00
Use _id instead of createdAt to improve performance
This commit is contained in:
parent
fff0e8bc6d
commit
6ea01697b1
1 changed files with 2 additions and 6 deletions
|
@ -38,12 +38,8 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
|
||||||
if (pollErr) return rej('invalid poll param');
|
if (pollErr) return rej('invalid poll param');
|
||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
createdAt: {
|
_id: { $gte: new Date(Date.now() - ms('1days')) },
|
||||||
$gte: new Date(Date.now() - ms('1days'))
|
renoteCount: { $gt: 0 },
|
||||||
},
|
|
||||||
renoteCount: {
|
|
||||||
$gt: 0
|
|
||||||
},
|
|
||||||
'_user.host': null
|
'_user.host': null
|
||||||
} as any;
|
} as any;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue