mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Fix exception with endpoints returning HTTP status code 204. Fixes #1891
This commit is contained in:
1 parent
36b9f8bdfd
commit
ce55ec73a4
29 files changed
+337
-192
No files matched your search
@@ -18,7 +18,7 @@
|
||||
API routes for drawings.
|
||||
"""
|
||||
|
||||
from fastapi import APIRouter, status
|
||||
from fastapi import APIRouter, Response, status
|
||||
from fastapi.encoders import jsonable_encoder
|
||||
from typing import List
|
||||
from uuid import UUID
|
||||
@@ -76,10 +76,11 @@ 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) -> None:
|
||||
async def delete_drawing(project_id: UUID, drawing_id: UUID) -> Response:
|
||||
"""
|
||||
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)
|
||||
Reference in new issue
Block a user