Remove explicit Response for endpoints returning HTTP 204 status code

This commit is contained in:
grossmj committed 2022-07-16 00:12:18 +02:00
1 parent 5b478fc331
commit fc6aeb715a
29 files changed
+162 -302

No files matched your search

+1 -2
View File
@@ -76,11 +76,10 @@ async def update_drawing(project_id: UUID, drawing_id: UUID, drawing_data: schem
@router.delete("/{drawing_id}", status_code=status.HTTP_204_NO_CONTENT)
async def delete_drawing(project_id: UUID, drawing_id: UUID) -> Response:
async def delete_drawing(project_id: UUID, drawing_id: UUID) -> None:
"""
Delete a drawing.
"""
project = await Controller.instance().get_loaded_project(str(project_id))
await project.delete_drawing(str(drawing_id))
return Response(status_code=status.HTTP_204_NO_CONTENT)