Parameterize followee as well

This commit is contained in:
PrivateGER 2024-10-07 16:47:15 +02:00
parent 1c3495ef59
commit 46e53e294e
No known key found for this signature in database
GPG key ID: 4AE9075DE407DCDA
2 changed files with 4 additions and 2 deletions

View file

@ -34,6 +34,7 @@ export const paramDef = {
untilId: { type: 'string', format: 'misskey:id' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
includeFollower: { type: 'boolean', default: false },
includeFollowee: { type: 'boolean', default: true },
},
required: ['host'],
} as const;
@ -55,7 +56,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: ps.includeFollower });
return await this.followingEntityService.packMany(followings, me, { populateFollowee: ps.includeFollowee, populateFollower: ps.includeFollower });
});
}
}

View file

@ -34,6 +34,7 @@ export const paramDef = {
untilId: { type: 'string', format: 'misskey:id' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
includeFollower: { type: 'boolean', default: false },
includeFollowee: { type: 'boolean', default: true },
},
required: ['host'],
} as const;
@ -55,7 +56,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: ps.includeFollower });
return await this.followingEntityService.packMany(followings, me, { populateFollowee: ps.includeFollowee, populateFollower: ps.includeFollower });
});
}
}