mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
feat: Pdf templates customer/company addresses
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user