From c463284c2fbcd5aacf182633a18143c5fe3135bf Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 7 Feb 2019 23:27:42 +0900 Subject: [PATCH] Fix bug --- .../endpoints/admin/federation/remove-all-following.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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([