diff --git a/app/api/todos.py b/app/api/todos.py index 77bd0b4..bde3092 100644 --- a/app/api/todos.py +++ b/app/api/todos.py @@ -78,10 +78,12 @@ def delete_todo( todo_id: int, db: Session = Depends(get_db), current_user: User = Depends(get_current_active_user) -): +) -> None: """ Delete a todo item for the current user. """ success = todo_crud.delete_todo(db, todo_id=todo_id, owner_id=current_user.id) if not success: - raise HTTPException(status_code=404, detail="Todo not found") \ No newline at end of file + raise HTTPException(status_code=404, detail="Todo not found") + # Explicitly return None for 204 response + return None \ No newline at end of file diff --git a/app/api/users.py b/app/api/users.py index 5cfed7f..4842f4d 100644 --- a/app/api/users.py +++ b/app/api/users.py @@ -74,7 +74,7 @@ def delete_user_endpoint( user_id: int, db: Session = Depends(get_db), current_user: User = Depends(get_current_active_user), -): +) -> None: """ Delete a user. """ @@ -87,4 +87,6 @@ def delete_user_endpoint( success = delete_user(db, user_id=user_id) if not success: - raise HTTPException(status_code=404, detail="User not found") \ No newline at end of file + raise HTTPException(status_code=404, detail="User not found") + # Explicitly return None for 204 response + return None \ No newline at end of file