fix: contract-pdf Type-Fehler (null signatureData + Buffer)
Some checks failed
Preview Deploy / deploy (push) Failing after 3m51s
Some checks failed
Preview Deploy / deploy (push) Failing after 3m51s
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user