diff options
| author | Luiz Gustavo Monteiro <luizgu_mreis@hotmail.com> | 2025-11-03 23:39:34 -0300 |
|---|---|---|
| committer | Luiz Gustavo Monteiro <luizgu_mreis@hotmail.com> | 2025-11-03 23:39:34 -0300 |
| commit | f392c3edaf52ccfa496d2e85f96e18ec81d11a65 (patch) | |
| tree | 17f15971a209936a774c9a313938452d986a89b5 /api/routes/stations.py | |
| parent | e987f732a7ad2d85a5760061a20873b841c10fac (diff) | |
refactor Post methods in schema files
Diffstat (limited to 'api/routes/stations.py')
| -rw-r--r-- | api/routes/stations.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/api/routes/stations.py b/api/routes/stations.py index 0a753fe..c7cdf7c 100644 --- a/api/routes/stations.py +++ b/api/routes/stations.py @@ -2,7 +2,7 @@ from fastapi import APIRouter, HTTPException from sqlalchemy import select from ..database import SessionLocal from ..models import Station, SensorDevice, Location -from pydantic import BaseModel +from ..schemas.station import PostStation from datetime import datetime router = APIRouter( @@ -35,11 +35,6 @@ async def get_stations(): session.close() return dc -class PostStation(BaseModel): - name: str - installation_date: int - location_id: int - @router.post('/') async def post_station(station: PostStation): session = SessionLocal() |
