rest-project-ksg1lk/endpoints/fruits.delete.py
2025-04-17 16:38:26 +00:00

14 lines
573 B
Python

# Simplified DELETE template
from fastapi import APIRouter, Depends, HTTPException, status
router = APIRouter()
@router.delete("/fruits", status_code=status.HTTP_204_NO_CONTENT) # Operates on the base path
async def delete_fruits( # Function name reflects resource (plural)
# db: Session = Depends(get_db) # Example dependency
):
"""fruits endpoint: Delete resource(s)"""
# TODO: Implement logic to delete fruits (e.g., clear collection or delete specific item based on criteria?)
print(f"Deleting fruits")
return None # Return No Content on success