fix: query only one day

This commit is contained in:
Namekuji 2023-08-10 02:47:27 -04:00
parent 618dc8349c
commit e74b7bab49
No known key found for this signature in database
GPG key ID: 1D62332C07FBA532

View file

@ -105,7 +105,7 @@ export default define(meta, paramDef, async (ps, user) => {
const foundPacked = [];
let untilDate: number | undefined;
while (foundPacked.length < ps.limit) {
const foundNotes = (await execNotePaginationQuery({...ps, untilDate}, filter)).slice(
const foundNotes = (await execNotePaginationQuery({...ps, untilDate}, filter, 1)).slice(
0,
ps.limit * 1.5,
); // Some may filtered out by Notes.packMany, thus we take more than ps.limit.