diff --git a/app/routers/chargepoint_v1.py b/app/routers/chargepoint_v1.py index cd768b5..806bdc3 100644 --- a/app/routers/chargepoint_v1.py +++ b/app/routers/chargepoint_v1.py @@ -13,10 +13,10 @@ from app.security import get_api_key router = APIRouter( prefix="/chargepoint", - tags=["chargepoint"], + tags=["chargepoint (v1)"], ) -@router.get(path="/", response_model=list[ChargePoint]) +@router.get(path="", response_model=list[ChargePoint]) async def get_chargepoints( skip: int = 0, limit: int = 20, @@ -60,7 +60,7 @@ async def reset_chargepoint_password( db.commit() return ChargePointPassword(password=chargepoint.password) -@router.post(path="/", response_model=ChargePoint) +@router.post(path="", status_code=201, response_model=ChargePoint) async def create_chargepoint( chargepoint: ChargePointCreate, api_key: str = Security(get_api_key), @@ -91,7 +91,7 @@ async def update_chargepoint( db.commit() return chargepoint -@router.delete(path="/{chargepoint_id}", response_model=[]) +@router.delete(path="/{chargepoint_id}", response_model=None) async def delete_chargepoint( chargepoint_id: UUID, api_key: str = Security(get_api_key),