Make including followers in response a parameter
This commit is contained in:
parent
bfd812720e
commit
1c3495ef59
|
@ -33,6 +33,7 @@ export const paramDef = {
|
|||
sinceId: { type: 'string', format: 'misskey:id' },
|
||||
untilId: { type: 'string', format: 'misskey:id' },
|
||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||
includeFollower: { type: 'boolean', default: false },
|
||||
},
|
||||
required: ['host'],
|
||||
} as const;
|
||||
|
@ -54,7 +55,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
.limit(ps.limit)
|
||||
.getMany();
|
||||
|
||||
return await this.followingEntityService.packMany(followings, me, { populateFollowee: true, populateFollower: true });
|
||||
return await this.followingEntityService.packMany(followings, me, { populateFollowee: true, populateFollower: ps.includeFollower });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ export const paramDef = {
|
|||
sinceId: { type: 'string', format: 'misskey:id' },
|
||||
untilId: { type: 'string', format: 'misskey:id' },
|
||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||
includeFollower: { type: 'boolean', default: false },
|
||||
},
|
||||
required: ['host'],
|
||||
} as const;
|
||||
|
@ -54,7 +55,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
.limit(ps.limit)
|
||||
.getMany();
|
||||
|
||||
return await this.followingEntityService.packMany(followings, me, { populateFollowee: true, populateFollower: true });
|
||||
return await this.followingEntityService.packMany(followings, me, { populateFollowee: true, populateFollower: ps.includeFollower });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -220,6 +220,7 @@ const followingPagination = {
|
|||
limit: 10,
|
||||
params: {
|
||||
host: props.host,
|
||||
includeFollower: true,
|
||||
},
|
||||
offsetMode: false,
|
||||
};
|
||||
|
@ -229,6 +230,7 @@ const followersPagination = {
|
|||
limit: 10,
|
||||
params: {
|
||||
host: props.host,
|
||||
includeFollower: true,
|
||||
},
|
||||
offsetMode: false,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue