Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send form demande d avis to endpoint api #511

Closed
leihuayi opened this issue Jul 10, 2024 · 2 comments · Fixed by #541
Closed

Send form demande d avis to endpoint api #511

leihuayi opened this issue Jul 10, 2024 · 2 comments · Fixed by #541
Assignees

Comments

@leihuayi
Copy link
Collaborator

leihuayi commented Jul 10, 2024

Depends on #469

Envoi du formulaire vers la route /api/expert-requests

@leihuayi leihuayi linked a pull request Jul 25, 2024 that will close this issue
@leihuayi
Copy link
Collaborator Author

Reste à vérifier que ça fonctionne

@nutfdt
Copy link
Collaborator

nutfdt commented Jul 25, 2024

class EmailData(BaseModel):
    firstname: str
    lastname: str
    nigend: str
    service: str | None
    phone: str
    email: str
    seizure: str
    una_or_procedure_number: str
    gun_type: str | None
    gun_length: int | None
    gun_barrel_length: int | None
    markings_description: str | None
    right_picture: str
    left_picture: str
    markings_pictures: str
    magazine_picture: str | None

@router.post("/expert-requests")
async def expert_form(
    request: EmailData,
):
    res = request
    print(res)`

Ce code permet de tester l'endpoint dans router.py

@nutfdt nutfdt removed a link to a pull request Aug 5, 2024
@nutfdt nutfdt linked a pull request Aug 5, 2024 that will close this issue
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants