feat: allow query param for qrcode (#3390)
Co-authored-by: dni ⚡ <office@dnilabs.com>
This commit is contained in:
@@ -113,8 +113,9 @@ async def api_fiat_as_sats(data: ConversionData):
|
|||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
||||||
|
@api_router.get("/api/v1/qrcode", response_class=StreamingResponse)
|
||||||
@api_router.get("/api/v1/qrcode/{data}", 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)
|
qr = pyqrcode.create(data)
|
||||||
stream = BytesIO()
|
stream = BytesIO()
|
||||||
qr.svg(stream, scale=3)
|
qr.svg(stream, scale=3)
|
||||||
|
|||||||
Reference in New Issue
Block a user