mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 19:33:09 +02:00
fix(backend): users/notes で途中までしかページネーションできなくなることがある問題を修正
This commit is contained in:
parent
0f367da84b
commit
0680ea3a78
1 changed files with 39 additions and 37 deletions
|
@ -144,8 +144,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
|
||||
timeline.sort((a, b) => a.id > b.id ? -1 : 1);
|
||||
|
||||
if (timeline.length > 0) {
|
||||
return await this.noteEntityService.packMany(timeline, me);
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
// fallback to database
|
||||
|
||||
//#region Construct query
|
||||
|
@ -182,7 +185,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
const timeline = await query.limit(ps.limit).getMany();
|
||||
|
||||
return await this.noteEntityService.packMany(timeline, me);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue