fix: user-tagページでユーザーが重複して読み込まれるのを修正 (#17163)

* fix: user-tagをページネーションに対応させる

* update changelog
This commit is contained in:
かっこかり
2026-02-15 11:50:23 +09:00
committed by GitHub
parent a22b82c414
commit af40eb4d31
4 changed files with 9 additions and 1 deletions

View File

@@ -32,6 +32,7 @@ export const paramDef = {
properties: {
tag: { type: 'string' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
offset: { type: 'integer', default: 0 },
sort: { type: 'string', enum: ['+follower', '-follower', '+createdAt', '-createdAt', '+updatedAt', '-updatedAt'] },
state: { type: 'string', enum: ['all', 'alive'], default: 'all' },
origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'local' },
@@ -74,7 +75,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
case '-updatedAt': query.orderBy('user.updatedAt', 'ASC'); break;
}
const users = await query.limit(ps.limit).getMany();
const users = await query
.limit(ps.limit)
.offset(ps.offset)
.getMany();
return await this.userEntityService.packMany(users, me, { schema: 'UserDetailed' });
});