Refactor quantity input parsing to handle additional units and improve conversion logic across inventory forms and recipe pages
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user