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:
DocFast Bot 2026-02-14 15:27:45 +00:00
parent 2638f6638c
commit 6891e488b6
4 changed files with 27 additions and 17 deletions

View file

@ -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",