Update index.mjs
This commit is contained in:
@@ -103,6 +103,8 @@ export default async function metrics({login, q}, {graphql, rest, plugins, conf,
|
||||
throw new Error("An error occured during embed rendering, dying")
|
||||
return "<p>⚠️ Failed to execute embed function: invalid arguments</p>"
|
||||
}
|
||||
console.debug(`metrics/compute/${login} > embed called with`)
|
||||
console.debug(q)
|
||||
let {base} = q
|
||||
q = {..._q, ...Object.fromEntries(Object.keys(Plugins).map(key => [key, false])), ...Object.fromEntries(conf.settings.plugins.base.parts.map(part => [`base.${part}`, false])), template:"classic", ...q}
|
||||
//Translate action syntax to web syntax
|
||||
@@ -120,8 +122,6 @@ export default async function metrics({login, q}, {graphql, rest, plugins, conf,
|
||||
q.config_animations = false
|
||||
}
|
||||
q = Object.fromEntries([...Object.entries(q).map(([key, value]) => [key.replace(/^plugin_/, "").replace(/_/g, "."), value]), ["base", false]])
|
||||
console.debug(`metrics/compute/${login} > embed called with`)
|
||||
console.debug(q)
|
||||
//Compute rendering
|
||||
const {rendered} = await metrics({login, q}, {...arguments[1], convert:["svg", "png", "jpeg"].includes(q["config.output"]) ? q["config.output"] : null}, arguments[2])
|
||||
console.debug(`metrics/compute/${login}/embed > ${name} > success >>>>>>>>>>>>>>>>>>>>>>`)
|
||||
|
||||
Reference in New Issue
Block a user