Phase2: Invoicecomputation/AdminpricingUI/Ainvoicemgnt
Build and Push / build (push) Failing after 45s

This commit is contained in:
admin committed 2026-05-24 14:12:26 +02:00
1 parent cdc2210eaf
commit d4fcc33bc1
4 files changed
+26 -27

No files matched your search

@@ -26,9 +26,16 @@ export async function GET(
if (!pdf) {
return new NextResponse("Not found", { status: 404 });
}
// Construct a response that the browser will render inline (PDF
// viewer) but also offer to download with the right filename.
return new NextResponse(pdf.data, {
// Web `Response`'s `BodyInit` doesn't include Node's `Buffer` — pg
// returns bytea as Buffer but Next/the runtime want a BufferSource.
// Wrap into a zero-copy Uint8Array view (Buffer extends Uint8Array
// under the hood, but TypeScript treats them as distinct).
const body = new Uint8Array(
pdf.data.buffer,
pdf.data.byteOffset,
pdf.data.byteLength
);
return new NextResponse(body, {
status: 200,
headers: {
"Content-Type": "application/pdf",