fix: resolver avisos de build e tipagem
This commit is contained in:
parent
741f1d7f9c
commit
fa9efdb5af
7 changed files with 154 additions and 59 deletions
|
|
@ -49,7 +49,8 @@ export async function POST(request: Request) {
|
|||
printBackground: true,
|
||||
pageRanges: "1",
|
||||
})
|
||||
return new NextResponse(pdf, {
|
||||
const pdfBytes = new Uint8Array(pdf)
|
||||
return new NextResponse(pdfBytes, {
|
||||
status: 200,
|
||||
headers: {
|
||||
"Content-Type": "application/pdf",
|
||||
|
|
@ -59,7 +60,8 @@ export async function POST(request: Request) {
|
|||
}
|
||||
|
||||
const screenshot = await page.screenshot({ type: "png", fullPage: true })
|
||||
return new NextResponse(screenshot, {
|
||||
const screenshotBytes = new Uint8Array(screenshot)
|
||||
return new NextResponse(screenshotBytes, {
|
||||
status: 200,
|
||||
headers: {
|
||||
"Content-Type": "image/png",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue