From 5e448deb0333dc1c9c1760e754c0f174232caeb9 Mon Sep 17 00:00:00 2001 From: Effy Elden Date: Mon, 19 Dec 2022 11:00:13 +1100 Subject: [PATCH] Fix peers API returning suspended instances (#9348) * Fix peers API returning suspended instances * Fix missing comma --- packages/backend/src/server/api/ApiServerService.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/backend/src/server/api/ApiServerService.ts b/packages/backend/src/server/api/ApiServerService.ts index 884ed0c8cb..e9641ea330 100644 --- a/packages/backend/src/server/api/ApiServerService.ts +++ b/packages/backend/src/server/api/ApiServerService.ts @@ -138,6 +138,9 @@ export class ApiServerService { fastify.get('/v1/instance/peers', async (request, reply) => { const instances = await this.instancesRepository.find({ select: ['host'], + where: { + isSuspended: false, + }, }); return instances.map(instance => instance.host);