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' },
|
sinceId: { type: 'string', format: 'misskey:id' },
|
||||||
untilId: { type: 'string', format: 'misskey:id' },
|
untilId: { type: 'string', format: 'misskey:id' },
|
||||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||||
|
includeFollower: { type: 'boolean', default: false },
|
||||||
},
|
},
|
||||||
required: ['host'],
|
required: ['host'],
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -54,7 +55,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
.limit(ps.limit)
|
.limit(ps.limit)
|
||||||
.getMany();
|
.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' },
|
sinceId: { type: 'string', format: 'misskey:id' },
|
||||||
untilId: { type: 'string', format: 'misskey:id' },
|
untilId: { type: 'string', format: 'misskey:id' },
|
||||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||||
|
includeFollower: { type: 'boolean', default: false },
|
||||||
},
|
},
|
||||||
required: ['host'],
|
required: ['host'],
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -54,7 +55,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
.limit(ps.limit)
|
.limit(ps.limit)
|
||||||
.getMany();
|
.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,
|
limit: 10,
|
||||||
params: {
|
params: {
|
||||||
host: props.host,
|
host: props.host,
|
||||||
|
includeFollower: true,
|
||||||
},
|
},
|
||||||
offsetMode: false,
|
offsetMode: false,
|
||||||
};
|
};
|
||||||
|
@ -229,6 +230,7 @@ const followersPagination = {
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: {
|
params: {
|
||||||
host: props.host,
|
host: props.host,
|
||||||
|
includeFollower: true,
|
||||||
},
|
},
|
||||||
offsetMode: false,
|
offsetMode: false,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue