From 93654b7e2cf3ab3fc7a42a42e58476dccdb60db5 Mon Sep 17 00:00:00 2001 From: ineffyble Date: Fri, 23 Dec 2022 04:32:45 +0000 Subject: [PATCH] Fix peers API returning suspended instances --- packages/backend/src/server/api/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/backend/src/server/api/index.ts b/packages/backend/src/server/api/index.ts index 37bcfffec8..8701d0a707 100644 --- a/packages/backend/src/server/api/index.ts +++ b/packages/backend/src/server/api/index.ts @@ -91,6 +91,9 @@ router.use(twitter.routes()); router.get('/v1/instance/peers', async ctx => { const instances = await Instances.find({ select: ['host'], + where: { + isSuspended: false, + }, }); ctx.body = instances.map(instance => instance.host);