package updates + tags selector

This commit is contained in:
Andras Bacsai
2022-10-26 15:50:10 +02:00
parent 52ba9dc02a
commit 4416646954
14 changed files with 571 additions and 730 deletions

View File

@@ -141,3 +141,12 @@ export async function getTemplates() {
// }
return templates
}
export async function getTags(type?: string) {
let tags: any = [];
if (isDev) {
tags = JSON.parse(await (await fs.readFile('./tags.json')).toString())
} else {
tags = JSON.parse(await (await fs.readFile('/app/tags.json')).toString())
}
return tags.find((tag: any) => tag.name.includes(type))
}