fix(BUG-006,007,008): copy feedback, invoice data unwrap, zero margins
BUG-007: Unwrap req.body.data for template endpoint (docs show wrapped format) BUG-008: Default PDF margins set to 0 (user can override via request body) BUG-006: Copy button shows Copied! for 2s then reverts
This commit is contained in:
parent
2638f6638c
commit
6891e488b6
4 changed files with 27 additions and 17 deletions
|
|
@ -25,7 +25,7 @@ templatesRouter.post("/:id/render", async (req: Request, res: Response) => {
|
|||
return;
|
||||
}
|
||||
|
||||
const data = req.body;
|
||||
const data = req.body.data || req.body;
|
||||
const html = renderTemplate(id, data);
|
||||
const pdf = await renderPdf(html, {
|
||||
format: data._format || "A4",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue