Adding the reset function
This commit is contained in:
@@ -7,7 +7,6 @@ from app.api.qr import router as qr_router
|
||||
def create_app() -> FastAPI:
|
||||
app = FastAPI(title="QR Code Service")
|
||||
|
||||
# Open CORS to all origins
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"],
|
||||
|
||||
@@ -6,7 +6,6 @@ import qrcode
|
||||
def generate_qr_image_bytes(text: str, size: int = 300) -> bytes:
|
||||
img = qrcode.make(text)
|
||||
|
||||
# Ensure RGB for consistent PNG output
|
||||
if getattr(img, "mode", None) != "RGB":
|
||||
img = img.convert("RGB")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user