From cc1b5e2f48ef62670be05ccfc6346b16b61844c8 Mon Sep 17 00:00:00 2001 From: Luiz Gustavo Monteiro Date: Mon, 3 Nov 2025 23:40:37 -0300 Subject: refactor Post methods in schema files --- api/routes/measures.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'api/routes/measures.py') diff --git a/api/routes/measures.py b/api/routes/measures.py index b435ae3..7aea38e 100644 --- a/api/routes/measures.py +++ b/api/routes/measures.py @@ -2,7 +2,7 @@ from fastapi import APIRouter from sqlalchemy import select from ..database import SessionLocal from ..models import Measure -from pydantic import BaseModel +from ..schemas.measures import PostMeasure router = APIRouter( prefix='/measures', @@ -26,10 +26,6 @@ async def get_measures(): session.close() return dc -class PostMeasure(BaseModel): - name: str - unit_code: str - @router.post('/') async def post_measure(measure: PostMeasure): session = SessionLocal() -- cgit v1.2.3