mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-12 02:39:17 +00:00
Update frontend/src/app/api/categories/route.ts
Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>
This commit is contained in:
parent
16657ec891
commit
e8ff2858d6
@ -32,7 +32,7 @@ const fetchScripts = async (): Script[] => {
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
const categories: Category[] = await fetchCategories();
|
||||
const categories = await fetchCategories();
|
||||
const scripts = await fetchScripts();
|
||||
for (const category of categories) {
|
||||
category.scripts = scripts.filter((script) => script.categories.includes(category.id));
|
||||
|
Loading…
Reference in New Issue
Block a user