fix: contract-pdf Type-Fehler (null signatureData + Buffer)
Some checks failed
Preview Deploy / deploy (push) Failing after 3m51s

This commit is contained in:
Julia Wehden
2026-03-20 10:59:35 +01:00
parent 08effe4e80
commit ff0da6b3e2

View File

@@ -46,7 +46,7 @@ export async function GET(
priceConfig,
};
const signatureData = booking.contractSignedOnline ? booking.contractSignatureData : undefined;
const signatureData = booking.contractSignedOnline ? booking.contractSignatureData ?? undefined : undefined;
const pdfBuffer = await generateContractFromTemplate(
bookingWithPriceConfig,
@@ -55,7 +55,7 @@ export async function GET(
signatureData
);
return new NextResponse(pdfBuffer, {
return new NextResponse(new Uint8Array(pdfBuffer), {
status: 200,
headers: {
'Content-Type': 'application/pdf',