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)`)
|
||||
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.status(204).send("No content: no data fetched yet")
|
||||
})
|
||||
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) {
|
||||
console.debug(`metrics/app/${login}/insights/plugins > ${plugin} > ${success ? "success" : "failure"}`)
|
||||
cache.put(`about.${login}.${plugin}`, result)
|
||||
}
|
||||
},
|
||||
}
|
||||
;(async () => {
|
||||
try {
|
||||
|
||||
@@ -167,8 +167,9 @@
|
||||
return this.metrics?.rendered.plugins?.followup ?? null
|
||||
},
|
||||
calendar() {
|
||||
if (this.metrics?.rendered.plugins?.calendar)
|
||||
return Object.assign(this.metrics?.rendered.plugins?.calendar, {color(c) {
|
||||
if (this.metrics?.rendered.plugins?.calendar) {
|
||||
return Object.assign(this.metrics?.rendered.plugins?.calendar, {
|
||||
color(c) {
|
||||
return {
|
||||
"#ebedf0": "var(--color-calendar-graph-day-bg)",
|
||||
"#9be9a8": "var(--color-calendar-graph-day-L1-bg)",
|
||||
@@ -176,7 +177,9 @@
|
||||
"#30a14e": "var(--color-calendar-graph-day-L3-bg)",
|
||||
"#216e39": "var(--color-calendar-graph-day-L4-bg)",
|
||||
}[c] ?? c
|
||||
}})
|
||||
},
|
||||
})
|
||||
}
|
||||
return null
|
||||
},
|
||||
isocalendar() {
|
||||
@@ -240,7 +243,7 @@
|
||||
error: null,
|
||||
config: {},
|
||||
progress: 0,
|
||||
loaded: []
|
||||
loaded: [],
|
||||
},
|
||||
})
|
||||
})()
|
||||
|
||||
Reference in New Issue
Block a user