fix: fetch more
This commit is contained in:
parent
ec3ad96d81
commit
b4022de717
1 changed files with 2 additions and 2 deletions
|
@ -93,7 +93,7 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
select: ["noteId"],
|
||||
where: whereOpt,
|
||||
order: { noteId: "DESC" },
|
||||
take: ps.limit,
|
||||
take: ps.limit * 5,
|
||||
});
|
||||
|
||||
if (noteIds.length === 0) {
|
||||
|
@ -156,7 +156,7 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
.execute(prepared.note.select.byIds, [noteIds], { prepare: true })
|
||||
.then((result) => result.rows.map(parseScyllaNote));
|
||||
|
||||
return Notes.packMany(await filter(foundNotes), user);
|
||||
return Notes.packMany((await filter(foundNotes)).slice(0, ps.limit), user);
|
||||
}
|
||||
|
||||
const query = makePaginationQuery(
|
||||
|
|
Loading…
Reference in a new issue