fix(app/metrics): load .yml presets rather than .yaml

This commit is contained in:
lowlighter
2022-01-26 19:22:22 -05:00
parent 69d74b6c73
commit 96e4146914

View File

@@ -22,7 +22,7 @@ export default async function presets(list, {log = true, core = null} = {}) {
let text = "" let text = ""
if (file.startsWith("@")) { if (file.startsWith("@")) {
logger(`metrics/presets > ${file} seems to be predefined preset, fetching`) logger(`metrics/presets > ${file} seems to be predefined preset, fetching`)
text = await fetch(`https://raw.githubusercontent.com/lowlighter/metrics/presets/${file.substring(1)}/preset.yaml`).then(response => response.text()) text = await fetch(`https://raw.githubusercontent.com/lowlighter/metrics/presets/${file.substring(1)}/preset.yml`).then(response => response.text())
} }
else if (file.startsWith("https://")) { else if (file.startsWith("https://")) {
logger(`metrics/presets > ${file} seems to be an url, fetching`) logger(`metrics/presets > ${file} seems to be an url, fetching`)