16 lines
554 B
Python
16 lines
554 B
Python
|
|
from fastapi import APIRouter, Depends, HTTPException, status
|
|
|
|
router = APIRouter()
|
|
|
|
@router.delete("/names/{name_id}", status_code=status.HTTP_204_NO_CONTENT)
|
|
async def delete_name_item(
|
|
name_id: Any, # TODO: Adjust type hint
|
|
# db: Session = Depends(get_db) # Example dependency
|
|
):
|
|
"""first rest: Delete item by ID"""
|
|
# TODO: Implement logic to delete name with id: {name_id}
|
|
print(f"Deleting name with id: {name_id}")
|
|
# Example: Check if found, perform deletion, raise 404 if not
|
|
return None # Return No Content on success
|