Refactor inventory forms to include unit and location options; update quantity input handling

This commit is contained in:
Nils-Johan Gynther
2026-04-09 23:25:52 +02:00
parent 50d79a348b
commit 03361f7b7d
9 changed files with 191 additions and 92 deletions
+19
View File
@@ -0,0 +1,19 @@
import { NextRequest, NextResponse } from 'next/server';
const API_BASE = process.env.NEXT_PUBLIC_API_URL_INTERNAL || 'http://recipe-api:8080';
export async function GET(request: NextRequest) {
const res = await fetch(`${API_BASE}/api/products`, {
method: 'GET',
cache: 'no-store',
});
const text = await res.text();
return new NextResponse(text, {
status: res.status,
headers: {
'Content-Type': 'application/json',
},
});
}