From e5d6410cafc1afbff3991f37a1ffb69ad45f51f4 Mon Sep 17 00:00:00 2001 From: Jasper Miller-Waugh Date: Wed, 3 Nov 2021 11:46:53 +1300 Subject: [PATCH] Apply formatting suggestions from code review Co-authored-by: Adam Stachowicz --- server/routers/api-router.js | 4 ++-- src/pages/StatusPage.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/routers/api-router.js b/server/routers/api-router.js index 30f6a828c..79e828378 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -149,7 +149,7 @@ router.get("/api/status-page/monitor-list", cache("5 minutes"), async (_request, for (let groupBean of list) { let monitorGroup = await groupBean.toPublicJSON(); if (tagsVisible) { - monitorGroup.monitorList = await Promise.all(monitorGroup.monitorList.map( async (monitor)=>{ + 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 const tags = await R.getAll( `SELECT monitor_tag.monitor_id, monitor_tag.value, tag.name, tag.color @@ -158,7 +158,7 @@ router.get("/api/status-page/monitor-list", cache("5 minutes"), async (_request, ON monitor_tag.tag_id = tag.id WHERE monitor_tag.monitor_id = ?`, [monitor.id] ); - return {...monitor,tags: tags} + return {...monitor, tags: tags} })); } diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index 70367cc9f..ce0f94b55 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -493,10 +493,10 @@ export default { // On load, the status page will not include tags if it's not enabled for security reasons // Which means if we enable tags, it won't show in the UI until saved // So we have this to enhance UX and load in the tags from the authenticated source instantly - this.$root.publicGroupList = this.$root.publicGroupList.map((group)=>{ + this.$root.publicGroupList = this.$root.publicGroupList.map((group) => { return { ...group, - monitorList: group.monitorList.map((monitor)=> { + monitorList: group.monitorList.map((monitor) => { // We only include the tags if visible so we can reuse the logic to hide the tags on disable return { ...monitor,