billing: fix param passthrough to API

This commit is contained in:
Conrad Hoffmann 2023-03-13 12:58:30 +01:00 committed by Drew DeVault
parent 4f41a72e5d
commit be2c32eea6
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ def invoice_POST(invoice_id):
**encrypt_request_authorization(user=current_user),
}
r = requests.post(f"{origin}/query/invoice/{invoice_id}",
headers=headers, data=request.get_data())
headers=headers, data=request.form)
filename = f"invoice_{invoice_id}.pdf"
headers = [('Content-Disposition', f'attachment; filename="{filename}"')]
return Response(r.content, mimetype="application/pdf", headers=headers)