feat: allow query param for qrcode (#3390)
Co-authored-by: dni ⚡ <office@dnilabs.com>
This commit is contained in:
parent
f31ffba06c
commit
e5ff928c3c
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue