Skip to content

Commit

Permalink
Implement endpoint for deleting images by entity ID #104
Browse files Browse the repository at this point in the history
  • Loading branch information
VKTB committed Feb 11, 2025
1 parent 3e31db9 commit 88f10b0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions object_storage_api/routers/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,18 @@ def delete_image(
# pylint: disable=missing-function-docstring
logger.info("Deleting image with ID: %s", image_id)
image_service.delete(image_id)


@router.delete(
path="",
summary="Delete images by entity ID",
response_description="Images deleted successfully",
status_code=status.HTTP_204_NO_CONTENT,
)
def delete_images_by_entity_id(
entity_id: Annotated[str, Query(description="The entity ID of the images to delete")],
image_service: ImageServiceDep,
) -> None:
# pylint: disable=missing-function-docstring
logger.info("Deleting images with entity ID: %s", entity_id)
image_service.delete_by_entity_id(entity_id)

0 comments on commit 88f10b0

Please sign in to comment.