fix(backend): users/notes で途中までしかページネーションできなくなることがある問題を修正
This commit is contained in:
parent
0f367da84b
commit
0680ea3a78
|
@ -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 New Issue