Fix peers API returning suspended instances
This commit is contained in:
parent
7e7740b955
commit
93654b7e2c
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue