fix ordering, remove parameters

deepsource-autofix-76c6eb20
Dan Gowans 2024-06-20 10:55:47 -04:00
parent 4e59ebe8ad
commit 0a4d54a150
3 changed files with 10 additions and 21 deletions

View File

@ -1,4 +1,4 @@
/// <reference types="cookie-parser" />
import type { Request, Response, NextFunction } from 'express';
import type { NextFunction, Request, Response } from 'express';
export declare function handler(request: Request, response: Response, next: NextFunction): Promise<void>;
export default handler;

View File

@ -5,7 +5,7 @@ import camelcase from 'camelcase';
import * as ejs from 'ejs';
import * as configFunctions from '../../helpers/functions.config.js';
import * as lotOccupancyFunctions from '../../helpers/functions.lotOccupancy.js';
import { getReportData, getPdfPrintConfig } from '../../helpers/functions.print.js';
import { getPdfPrintConfig, getReportData } from '../../helpers/functions.print.js';
const attachmentOrInline = configFunctions.getProperty('settings.printPdf.contentDisposition');
export async function handler(request, response, next) {
const printName = request.params.printName;
@ -40,9 +40,6 @@ export async function handler(request, response, next) {
format: 'letter',
printBackground: true,
preferCSSPageSize: true
}, undefined, {
cacheBrowser: true,
remoteContent: false
});
pdfCallbackFunction(pdf);
}

View File

@ -4,13 +4,13 @@ import { convertHTMLToPDF } from '@cityssm/pdf-puppeteer'
import * as dateTimeFunctions from '@cityssm/utils-datetime'
import camelcase from 'camelcase'
import * as ejs from 'ejs'
import type { Request, Response, NextFunction } from 'express'
import type { NextFunction, Request, Response } from 'express'
import * as configFunctions from '../../helpers/functions.config.js'
import * as lotOccupancyFunctions from '../../helpers/functions.lotOccupancy.js'
import {
getReportData,
getPdfPrintConfig
getPdfPrintConfig,
getReportData
} from '../../helpers/functions.print.js'
const attachmentOrInline = configFunctions.getProperty(
@ -74,19 +74,11 @@ export async function handler(
return
}
const pdf = await convertHTMLToPDF(
ejsData,
{
const pdf = await convertHTMLToPDF(ejsData, {
format: 'letter',
printBackground: true,
preferCSSPageSize: true
},
undefined,
{
cacheBrowser: true,
remoteContent: false
}
)
})
pdfCallbackFunction(pdf)
}