From 348c5ec995c34d7d17f1e44297e205f04858d787 Mon Sep 17 00:00:00 2001 From: Jasper Miller-Waugh Date: Thu, 28 Oct 2021 15:07:19 +1300 Subject: [PATCH] Match lint settings --- server/routers/api-router.js | 7 ++++--- src/components/PublicGroupList.vue | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/routers/api-router.js b/server/routers/api-router.js index be186ccca..bf0cc54c8 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -142,12 +142,13 @@ router.get("/api/status-page/monitor-list", cache("5 minutes"), async (_request, const publicGroupList = []; let list = await R.find("group", " public = 1 ORDER BY weight "); for (let groupBean of list) { - let monitor_info = await groupBean.toPublicJSON() - monitor_info.monitorList = await Promise.all(monitor_info.monitorList.map( async (monitor)=>{ + let monitorGroup = await groupBean.toPublicJSON() + monitorGroup.monitorList = await Promise.all(monitorGroup.monitorList.map( async (monitor)=>{ + // Includes tags as an array in response, allows for tags to be displayed on public status page let tags = await R.getAll("SELECT mt.monitor_id,mt.value, tag.name, tag.color FROM monitor_tag mt JOIN tag ON mt.tag_id = tag.id WHERE mt.monitor_id = ?", [monitor.id]); return {...monitor,tags: tags} })) - publicGroupList.push(monitor_info); + publicGroupList.push(monitorGroup); } response.json(publicGroupList); diff --git a/src/components/PublicGroupList.vue b/src/components/PublicGroupList.vue index 97441d50e..f30edcef5 100644 --- a/src/components/PublicGroupList.vue +++ b/src/components/PublicGroupList.vue @@ -40,7 +40,6 @@ {{ monitor.element.name }} -