Skip to content

Commit

Permalink
sampling/estimationのpost/deteleののレスポンスコード200を201,204に変更
Browse files Browse the repository at this point in the history
  • Loading branch information
n-kakuko authored Oct 9, 2024
1 parent 5dfb74b commit dd78a1c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backend/oqtopus_cloud/user/routers/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def get_sampling_task(

@router.delete(
"/tasks/sampling/{taskId}",
status_code=status.HTTP_204_NO_CONTENT,
status_code=status.HTTP_202_ACCEPTED,
response_model=SuccessResponse,
responses={400: {"model": Detail}, 404: {"model": Detail}, 500: {"model": Detail}},
)
Expand All @@ -459,7 +459,7 @@ def delete_sampling_task(
event: Event,
taskId: str,
db: Session = Depends(get_db),
) -> None:
) -> None SuccessResponse | ErrorResponse:
try:
TaskId(root=uuid.UUID(taskId))
except ValidationError:
Expand Down Expand Up @@ -770,7 +770,7 @@ def get_estimation_task(

@router.delete(
"/tasks/estimation/{taskId}",
status_code=status.HTTP_204_NO_CONTENT,
status_code=status.HTTP_202_ACCEPTED,
response_model=SuccessResponse,
responses={400: {"model": Detail}, 404: {"model": Detail}, 500: {"model": Detail}},
)
Expand All @@ -779,7 +779,7 @@ def delete_estimation_task(
event: Event,
taskId: str,
db: Session = Depends(get_db),
) -> None:
) -> SuccessResponse | ErrorResponse:
try:
TaskId(root=uuid.UUID(taskId))
except ValidationError:
Expand Down

0 comments on commit dd78a1c

Please sign in to comment.