mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-22 11:25:13 +00:00
Make remove-all-following remove follows in both directions
This commit is contained in:
parent
b3f925c426
commit
996d079476
1 changed files with 8 additions and 3 deletions
|
@ -37,9 +37,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
private queueService: QueueService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const followings = await this.followingsRepository.findBy({
|
||||
followerHost: ps.host,
|
||||
});
|
||||
const followings = await this.followingsRepository.findBy([
|
||||
{
|
||||
followeeHost: ps.host,
|
||||
},
|
||||
{
|
||||
followerHost: ps.host,
|
||||
},
|
||||
]);
|
||||
|
||||
const pairs = await Promise.all(followings.map(f => Promise.all([
|
||||
this.usersRepository.findOneByOrFail({ id: f.followerId }),
|
||||
|
|
Loading…
Reference in a new issue