Skip to content
Snippets Groups Projects
Commit 97c4758d authored by syuilo's avatar syuilo
Browse files

Use _id instead of createdAt to improve performance

parent f20c08f0
No related branches found
Tags 13.7.2
No related merge requests found
...@@ -38,12 +38,8 @@ module.exports = (params, user) => new Promise(async (res, rej) => { ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment