perf(backend): Use ThinUser in admin/federation/remove-all-following

This commit is contained in:
tamaina 2023-04-29 14:35:48 +00:00
parent 0ab50f87a2
commit 351bee325b
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
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 }),
this.usersRepository.findOneByOrFail({ id: f.followeeId }), this.usersRepository.findOneByOrFail({ id: f.followeeId }),
]))); ]).then(([from, to]) => [{ id: from.id }, { id: to.id }])));
this.queueService.createUnfollowJob(pairs.map(p => ({ from: p[0], to: p[1], silent: true }))); this.queueService.createUnfollowJob(pairs.map(p => ({ from: p[0], to: p[1], silent: true })));
}); });