mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Remove explicit Response for endpoints returning HTTP 204 status code
This commit is contained in:
1 parent
5b478fc331
commit
fc6aeb715a
29 files changed
+162
-302
No files matched your search
@@ -102,7 +102,7 @@ async def delete_template(
|
||||
templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)),
|
||||
images_repo: RbacRepository = Depends(get_repository(ImagesRepository)),
|
||||
rbac_repo: RbacRepository = Depends(get_repository(RbacRepository))
|
||||
) -> Response:
|
||||
) -> None:
|
||||
"""
|
||||
Delete a template.
|
||||
"""
|
||||
@@ -111,7 +111,6 @@ async def delete_template(
|
||||
await rbac_repo.delete_all_permissions_with_path(f"/templates/{template_id}")
|
||||
if prune_images:
|
||||
await images_repo.prune_images()
|
||||
return Response(status_code=status.HTTP_204_NO_CONTENT)
|
||||
|
||||
|
||||
@router.get("", response_model=List[schemas.Template], response_model_exclude_unset=True)
|
||||
|
||||
Reference in new issue
Block a user