chore: code formatting
This commit is contained in:
@@ -193,9 +193,8 @@ export default async function({sandbox = false} = {}) {
|
|||||||
console.debug(`metrics/app/${login}/insights > 400 (invalid plugin name)`)
|
console.debug(`metrics/app/${login}/insights > 400 (invalid plugin name)`)
|
||||||
return res.status(400).send("Bad request: plugin name seems invalid")
|
return res.status(400).send("Bad request: plugin name seems invalid")
|
||||||
}
|
}
|
||||||
if (cache.get(`about.${login}.${plugin}`)) {
|
if (cache.get(`about.${login}.${plugin}`))
|
||||||
return res.send(cache.get(`about.${login}.${plugin}`))
|
return res.send(cache.get(`about.${login}.${plugin}`))
|
||||||
}
|
|
||||||
return res.status(204).send("No content: no data fetched yet")
|
return res.status(204).send("No content: no data fetched yet")
|
||||||
})
|
})
|
||||||
app.get("/about/query/:login/", ...middlewares, async (req, res) => {
|
app.get("/about/query/:login/", ...middlewares, async (req, res) => {
|
||||||
@@ -227,7 +226,7 @@ export default async function({sandbox = false} = {}) {
|
|||||||
async plugin(login, plugin, success, result) {
|
async plugin(login, plugin, success, result) {
|
||||||
console.debug(`metrics/app/${login}/insights/plugins > ${plugin} > ${success ? "success" : "failure"}`)
|
console.debug(`metrics/app/${login}/insights/plugins > ${plugin} > ${success ? "success" : "failure"}`)
|
||||||
cache.put(`about.${login}.${plugin}`, result)
|
cache.put(`about.${login}.${plugin}`, result)
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
;(async () => {
|
;(async () => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -167,8 +167,9 @@
|
|||||||
return this.metrics?.rendered.plugins?.followup ?? null
|
return this.metrics?.rendered.plugins?.followup ?? null
|
||||||
},
|
},
|
||||||
calendar() {
|
calendar() {
|
||||||
if (this.metrics?.rendered.plugins?.calendar)
|
if (this.metrics?.rendered.plugins?.calendar) {
|
||||||
return Object.assign(this.metrics?.rendered.plugins?.calendar, {color(c) {
|
return Object.assign(this.metrics?.rendered.plugins?.calendar, {
|
||||||
|
color(c) {
|
||||||
return {
|
return {
|
||||||
"#ebedf0": "var(--color-calendar-graph-day-bg)",
|
"#ebedf0": "var(--color-calendar-graph-day-bg)",
|
||||||
"#9be9a8": "var(--color-calendar-graph-day-L1-bg)",
|
"#9be9a8": "var(--color-calendar-graph-day-L1-bg)",
|
||||||
@@ -176,7 +177,9 @@
|
|||||||
"#30a14e": "var(--color-calendar-graph-day-L3-bg)",
|
"#30a14e": "var(--color-calendar-graph-day-L3-bg)",
|
||||||
"#216e39": "var(--color-calendar-graph-day-L4-bg)",
|
"#216e39": "var(--color-calendar-graph-day-L4-bg)",
|
||||||
}[c] ?? c
|
}[c] ?? c
|
||||||
}})
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
return null
|
return null
|
||||||
},
|
},
|
||||||
isocalendar() {
|
isocalendar() {
|
||||||
@@ -240,7 +243,7 @@
|
|||||||
error: null,
|
error: null,
|
||||||
config: {},
|
config: {},
|
||||||
progress: 0,
|
progress: 0,
|
||||||
loaded: []
|
loaded: [],
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
})()
|
})()
|
||||||
|
|||||||
Reference in New Issue
Block a user