From b9c4a9a09041d636c751576dbdbc3ad7bc6ba8de Mon Sep 17 00:00:00 2001 From: Cadence Fish Date: Fri, 14 Feb 2020 23:32:02 +1300 Subject: [PATCH] Add RSS and Cloudflare to /api/instances --- src/site/api/instances.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/site/api/instances.js b/src/site/api/instances.js index 2745f60..b8c8ec2 100644 --- a/src/site/api/instances.js +++ b/src/site/api/instances.js @@ -27,13 +27,15 @@ module.exports = [ while (inTable && parser.hasRemaining()) { const line = parser.get({split: "\n"}) if (line.startsWith("|")) { - /** [empty, official, address, country] */ + /** [empty, official, address, country, rss, cloudflare] */ const parts = line.split("|") if (parts.length >= 4 && parts[2].includes("://")) { instances.push({ address: parts[2].trim(), country: parts[3].match(/[A-Z]{2,}|$/)[0] || null, - official: parts[1].trim() === ":white_check_mark:" + official: parts[1].trim() === ":white_check_mark:", + rss: parts[4].trim() === ":white_check_mark:", + cloudflare: parts[5].trim() === ":crying_cat_face:" }) } } else {