Skip to content

Commit

Permalink
refactor: rename downloadPDF to downloadPDFResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
ax-sh committed Dec 3, 2024
1 parent 91be70a commit 840d6ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/core/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async function makeBrowser(type: "netlify" = "netlify") {
return browser;
}

export async function downloadPDF() {
export async function downloadPDFResponse() {
const browser = await makeBrowser("netlify");
const page = await browser.newPage();
const url = "https://ax-sh.github.io/";
Expand Down
4 changes: 2 additions & 2 deletions api/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Netlify On-demand Builder (runs on first request only)
// // exports.handler = builder(handler);
// exports.handler = builder(handler);

import type { Handler } from "@netlify/functions";

export const handler: Handler = async (event, context) => {
const core = await import("./core");
const data = await core.downloadPDF();
const data = await core.downloadPDFResponse();
return data;
};

0 comments on commit 840d6ab

Please sign in to comment.