Skip to content
Snippets Groups Projects
Commit 351bee32 authored by tamaina's avatar tamaina
Browse files

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

parent 0ab50f87
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
const pairs = await Promise.all(followings.map(f => Promise.all([
this.usersRepository.findOneByOrFail({ id: f.followerId }),
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 })));
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment