Implement recipe retrieval methods and enhance inventory item types for better data handling

This commit is contained in:
Nils-Johan Gynther
2026-04-09 22:16:09 +02:00
parent 29910130f0
commit bc89e3038b
3 changed files with 52 additions and 7 deletions
@@ -5,6 +5,13 @@ const API_BASE = process.env.NEXT_PUBLIC_API_URL_INTERNAL || 'http://recipe-api:
export async function GET(request: NextRequest) {
const id = request.nextUrl.searchParams.get('id');
if (!id) {
return NextResponse.json(
{ error: 'Missing id parameter' },
{ status: 400 }
);
}
const res = await fetch(`${API_BASE}/api/recipes/${id}/inventory-preview`, {
method: 'GET',
cache: 'no-store',