refactor(api): change query params to path params in document endpoint
This commit is contained in:
parent
a1794ac90f
commit
61e787bf36
1 changed files with 3 additions and 3 deletions
6
api.py
6
api.py
|
|
@ -1,4 +1,4 @@
|
|||
from fastapi import FastAPI, HTTPException, Query, Depends, status
|
||||
from fastapi import FastAPI, HTTPException, Path, Query, Depends, status
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from fastapi.responses import StreamingResponse
|
||||
from pydantic import BaseModel, Field, EmailStr, validator, field_validator
|
||||
|
|
@ -1254,8 +1254,8 @@ async def telecharger_devis_pdf(id: str):
|
|||
|
||||
@app.get("/documents/{type_doc}/{numero}/pdf", tags=["Documents"])
|
||||
async def telecharger_document_pdf(
|
||||
type_doc: int = Query(..., description="Type de document (0=Devis, 10=Commande, 30=Livraison, 60=Facture, 50=Avoir)"),
|
||||
numero: str = Query(..., description="Numéro du document")
|
||||
type_doc: int = Path(..., description="Type de document (0=Devis, 10=Commande, 30=Livraison, 60=Facture, 50=Avoir)"),
|
||||
numero: str = Path(..., description="Numéro du document")
|
||||
):
|
||||
"""
|
||||
📄 Téléchargement PDF d'un document (route généralisée)
|
||||
|
|
|
|||
Loading…
Reference in a new issue