Make remove-all-following remove follows in both directions
This commit is contained in:
parent
b3f925c426
commit
996d079476
@ -37,9 +37,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||||||
private queueService: QueueService,
|
private queueService: QueueService,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
const followings = await this.followingsRepository.findBy({
|
const followings = await this.followingsRepository.findBy([
|
||||||
|
{
|
||||||
|
followeeHost: ps.host,
|
||||||
|
},
|
||||||
|
{
|
||||||
followerHost: ps.host,
|
followerHost: ps.host,
|
||||||
});
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
const pairs = await Promise.all(followings.map(f => Promise.all([
|
const pairs = await Promise.all(followings.map(f => Promise.all([
|
||||||
this.usersRepository.findOneByOrFail({ id: f.followerId }),
|
this.usersRepository.findOneByOrFail({ id: f.followerId }),
|
||||||
|
Loading…
Reference in New Issue
Block a user