From 8cc7e6a57de1b6b8f7067459de499cfab25ae67b Mon Sep 17 00:00:00 2001 From: Joao Ramos Date: Thu, 21 Mar 2024 10:57:55 +0000 Subject: [PATCH] Removed change setup for debug --- src/pages/api/stats/[id]/export.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/api/stats/[id]/export.tsx b/src/pages/api/stats/[id]/export.tsx index 3b77020f..ce71d899 100644 --- a/src/pages/api/stats/[id]/export.tsx +++ b/src/pages/api/stats/[id]/export.tsx @@ -136,14 +136,14 @@ async function post(req: NextApiRequest, res: NextApiResponse) { const userId = stats[statIndex].user; - // if (hasPDF) { - // // if it does, return the pdf url - // const fileRef = ref(storage, hasPDF.pdf.path); - // const url = await getDownloadURL(fileRef); + if (hasPDF) { + // if it does, return the pdf url + const fileRef = ref(storage, hasPDF.pdf.path); + const url = await getDownloadURL(fileRef); - // res.status(200).end(url); - // return; - // } + res.status(200).end(url); + return; + } try { // generate the pdf report