Lots of changes to get to FastAPI 95.1

This commit is contained in:
Scott Idem
2024-04-26 15:15:37 -04:00
parent f4eda34035
commit faecd974b9
38 changed files with 78 additions and 79 deletions

View File

@@ -1,6 +1,6 @@
import os, pathlib, qrcode, time
from fastapi import APIRouter, Body, Depends, File, Form, Header, HTTPException, Query, Response, status, UploadFile
from fastapi import APIRouter, Body, Depends, File, Form, Header, HTTPException, Path, Query, Response, status, UploadFile
from fastapi.responses import FileResponse
from pydantic import BaseModel, EmailStr, Field
from typing import Dict, List, Optional, Set, Union
@@ -23,9 +23,9 @@ router = APIRouter()
@router.get('/qr/{account_id}/{qr_id}', response_model=Resp_Body_Base)
@router.get('/qr/{qr_id}', response_model=Resp_Body_Base)
async def get_qr(
# account_id: str = Query(..., min_length=11, max_length=22),
qr_id: str = Query(..., min_length=11, max_length=22),
account_id: str = Query(None, min_length=11, max_length=22),
# account_id: str = Path(min_length=11, max_length=22),
qr_id: str = Path(min_length=11, max_length=22),
account_id: str = Path(min_length=11, max_length=22),
regen: bool = False,
qr_type: str = Query(None, min_length=1, max_length=10),
filename: str = Query(None, min_length=4, max_length=100),