Moved pdf creatior initialization to new function

ref #5
This commit is contained in:
2021-02-06 21:30:18 +01:00
parent f755f4f9fb
commit 47a05facb3
2 changed files with 11 additions and 11 deletions

View File

@@ -10,10 +10,7 @@ import { PdfCreator } from '../PdfCreator';
*/
@JsonController()
export class PdfController {
private pdf: PdfCreator;
constructor() {
this.pdf = new PdfCreator();
}
private pdf: PdfCreator = new PdfCreator();
@Post('/contracts')
@OpenAPI({ description: "Generate Sponsoring contract pdfs from runner objects.<br>You can choose your prefered locale by passing the 'locale' query-param." })