feat: Pdf templates customer/company addresses

This commit is contained in:
Ahmed Bouhuolia
2024-09-29 18:04:56 +02:00
parent d465ee15bd
commit 6b6027a588
16 changed files with 190 additions and 58 deletions

View File

@@ -31,6 +31,7 @@ export class PdfTemplatesController extends BaseController {
this.validationResult,
this.editPdfTemplate.bind(this)
);
router.get('/state', this.getOrganizationBrandingState.bind(this));
router.get(
'/',
[query('resource').optional()],
@@ -175,4 +176,20 @@ export class PdfTemplatesController extends BaseController {
next(error);
}
}
async getOrganizationBrandingState(
req: Request,
res: Response,
next: NextFunction
) {
const { tenantId } = req;
try {
const data =
await this.pdfTemplateApplication.getPdfTemplateBrandingState(tenantId);
return res.status(200).send({ data });
} catch (error) {
next(error);
}
}
}