feat: add receipt import functionality with UI and backend integration

This commit is contained in:
Nils-Johan Gynther
2026-04-16 20:02:57 +02:00
parent 88d3c4ad73
commit a12abe0402
10 changed files with 513 additions and 0 deletions
@@ -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 POST(request: NextRequest) {
const formData = await request.formData();
const res = await fetch(`${API_BASE}/api/receipt-import`, {
method: 'POST',
body: formData,
});
const text = await res.text();
return new NextResponse(text, {
status: res.status,
headers: { 'Content-Type': 'application/json' },
});
}