summaryrefslogtreecommitdiff
path: root/api/routes
diff options
context:
space:
mode:
authorLuiz Gustavo Monteiro <luizgu_mreis@hotmail.com>2025-11-03 23:40:37 -0300
committerLuiz Gustavo Monteiro <luizgu_mreis@hotmail.com>2025-11-03 23:40:37 -0300
commitcc1b5e2f48ef62670be05ccfc6346b16b61844c8 (patch)
tree9b15ad2672557084e7addbb22f708a193e9c132b /api/routes
parentf392c3edaf52ccfa496d2e85f96e18ec81d11a65 (diff)
refactor Post methods in schema files
Diffstat (limited to 'api/routes')
-rw-r--r--api/routes/measures.py6
1 files changed, 1 insertions, 5 deletions
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()