Fix peers API returning suspended instances (#9296)

This commit is contained in:
Kainoa Kanter 2022-12-24 11:07:41 +00:00
commit afce8f04ab
1 changed files with 3 additions and 0 deletions

View File

@ -91,6 +91,9 @@ router.use(twitter.routes());
router.get('/v1/instance/peers', async ctx => { router.get('/v1/instance/peers', async ctx => {
const instances = await Instances.find({ const instances = await Instances.find({
select: ['host'], select: ['host'],
where: {
isSuspended: false,
},
}); });
ctx.body = instances.map(instance => instance.host); ctx.body = instances.map(instance => instance.host);