diff --git a/src/server/api/endpoints/admin/federation/remove-all-following.ts b/src/server/api/endpoints/admin/federation/remove-all-following.ts index 1021965b1e..d4dbc3e484 100644 --- a/src/server/api/endpoints/admin/federation/remove-all-following.ts +++ b/src/server/api/endpoints/admin/federation/remove-all-following.ts @@ -17,15 +17,8 @@ export const meta = { }; export default define(meta, (ps, me) => new Promise(async (res, rej) => { - const instance = await Instance - .findOne({ host: ps.host }); - - if (instance == null) { - return rej('instance not found'); - } - const followings = await Following.find({ - '_follower.host': { $ne: null } + '_follower.host': ps.host }); const pairs = await Promise.all(followings.map(f => Promise.all([