From f392c3edaf52ccfa496d2e85f96e18ec81d11a65 Mon Sep 17 00:00:00 2001 From: Luiz Gustavo Monteiro Date: Mon, 3 Nov 2025 23:39:34 -0300 Subject: refactor Post methods in schema files --- api/routes/locations.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'api/routes/locations.py') diff --git a/api/routes/locations.py b/api/routes/locations.py index 744fa7f..43578df 100644 --- a/api/routes/locations.py +++ b/api/routes/locations.py @@ -2,6 +2,7 @@ from fastapi import APIRouter from sqlalchemy import select from ..database import SessionLocal from ..models import Location +from ..schemas.location import PostLocation from pydantic import BaseModel @@ -28,12 +29,6 @@ async def get_locations(): session.close() return dc - -class PostLocation(BaseModel): - street: str - avenue: str - zip_code:str - @router.post('/') async def create_location(location: PostLocation): session = SessionLocal() -- cgit v1.2.3