From e5ff928c3c0f8a8f9e6391c96d1ebb4bc7f7eab6 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Wed, 15 Oct 2025 13:48:32 +0300 Subject: [PATCH] feat: allow query param for qrcode (#3390) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: dni ⚡ --- lnbits/core/views/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lnbits/core/views/api.py b/lnbits/core/views/api.py index 4262dad8..a75dc474 100644 --- a/lnbits/core/views/api.py +++ b/lnbits/core/views/api.py @@ -113,8 +113,9 @@ async def api_fiat_as_sats(data: ConversionData): return output +@api_router.get("/api/v1/qrcode", response_class=StreamingResponse) @api_router.get("/api/v1/qrcode/{data}", response_class=StreamingResponse) -async def img(data): +async def img(data: str): qr = pyqrcode.create(data) stream = BytesIO() qr.svg(stream, scale=3)