diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-02-07 23:27:42 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-02-07 23:27:42 +0900 |
| commit | c463284c2fbcd5aacf182633a18143c5fe3135bf (patch) | |
| tree | a8e3ef08eb51ee678d20e5d7e85c4498ede0c8e2 /src/server/api/endpoints/admin/federation | |
| parent | インスタンス一覧の表示数を増やした (diff) | |
| download | sharkey-c463284c2fbcd5aacf182633a18143c5fe3135bf.tar.gz sharkey-c463284c2fbcd5aacf182633a18143c5fe3135bf.tar.bz2 sharkey-c463284c2fbcd5aacf182633a18143c5fe3135bf.zip | |
Fix bug
Diffstat (limited to 'src/server/api/endpoints/admin/federation')
| -rw-r--r-- | src/server/api/endpoints/admin/federation/remove-all-following.ts | 9 |
1 files changed, 1 insertions, 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([ |