feat(admin): add API endpoint to download order confirmation PDF securely as attachment

This commit is contained in:
DanielS
2026-06-30 15:36:42 +02:00
parent fc51d53aa3
commit 19e9733144
2 changed files with 54 additions and 1 deletions

View File

@@ -224,7 +224,7 @@ export function OrdersTable({ initialOrders }: OrdersTableProps) {
</a>
</Button>
<Button variant="secondary" size="sm" asChild className="h-8 text-xs">
<a href={order.pdf_url} download>
<a href={`/api/admin/orders/${order.id}/download`}>
<Download className="w-3.5 h-3.5" />
</a>
</Button>