feat(categories): implement category management with hierarchical structure and update product association

This commit is contained in:
Nils-Johan Gynther
2026-04-17 21:16:58 +02:00
parent a9e83544c5
commit cc8be88462
11 changed files with 286 additions and 42 deletions
+12
View File
@@ -0,0 +1,12 @@
import { NextResponse } from 'next/server';
const API_BASE = process.env.NEXT_PUBLIC_API_URL_INTERNAL || 'http://recipe-api:8080';
export async function GET() {
const res = await fetch(`${API_BASE}/api/categories/tree`, { cache: 'no-store' });
const text = await res.text();
return new NextResponse(text, {
status: res.status,
headers: { 'Content-Type': 'application/json' },
});
}