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"],
|
select: ["noteId"],
|
||||||
where: whereOpt,
|
where: whereOpt,
|
||||||
order: { noteId: "DESC" },
|
order: { noteId: "DESC" },
|
||||||
take: ps.limit,
|
take: ps.limit * 5,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (noteIds.length === 0) {
|
if (noteIds.length === 0) {
|
||||||
|
@ -156,7 +156,7 @@ export default define(meta, paramDef, async (ps, user) => {
|
||||||
.execute(prepared.note.select.byIds, [noteIds], { prepare: true })
|
.execute(prepared.note.select.byIds, [noteIds], { prepare: true })
|
||||||
.then((result) => result.rows.map(parseScyllaNote));
|
.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(
|
const query = makePaginationQuery(
|
||||||
|
|
Loading…
Reference in a new issue