Refactor quantity input parsing to handle additional units and improve conversion logic across inventory forms and recipe pages

This commit is contained in:
Nils-Johan Gynther
2026-04-09 23:36:36 +02:00
parent 03361f7b7d
commit fd8480197c
6 changed files with 68 additions and 29 deletions
+2 -7
View File
@@ -8,12 +8,7 @@ export async function GET(request: NextRequest) {
cache: 'no-store',
});
const text = await res.text();
const data = await res.json();
return new NextResponse(text, {
status: res.status,
headers: {
'Content-Type': 'application/json',
},
});
return NextResponse.json(data, { status: res.status });
}