Temporarily disabled hasPDF validation
This commit is contained in:
@@ -183,13 +183,13 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
|
||||
|
||||
const stats = docsSnap.docs.map((d) => d.data());
|
||||
// verify if the stats already have a pdf generated
|
||||
const hasPDF = stats.find((s) => s.pdf);
|
||||
// const hasPDF = stats.find((s) => s.pdf);
|
||||
|
||||
if (hasPDF) {
|
||||
// if it does, return the pdf url
|
||||
res.status(200).end(hasPDF.pdf);
|
||||
return;
|
||||
}
|
||||
// if (hasPDF) {
|
||||
// // if it does, return the pdf url
|
||||
// res.status(200).end(hasPDF.pdf);
|
||||
// return;
|
||||
// }
|
||||
|
||||
try {
|
||||
// generate the pdf report
|
||||
|
||||
Reference in New Issue
Block a user