Skip to content

Commit

Permalink
Disable "all" endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jhj0517 committed Nov 24, 2024
1 parent 55e7846 commit 4096b9a
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions backend/routers/task/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,6 @@
task_router = APIRouter(prefix="/task", tags=["Tasks"])


@task_router.get(
"/all",
response_model=TasksResult,
status_code=status.HTTP_200_OK,
summary="Retrieve All Task Statuses",
description="Retrieve the statuses of all tasks available in the system.",
)
async def get_all_tasks_status(
session: Session = Depends(get_db_session),
) -> TasksResult:
"""
Retrieve all tasks.
"""
return get_all_tasks_status_from_db(session=session)


@task_router.get(
"/{identifier}",
response_model=Task,
Expand Down Expand Up @@ -127,3 +111,19 @@ async def delete_task(
return Response(identifier=identifier, message="Task deleted")
else:
raise HTTPException(status_code=404, detail="Task not found")


# @task_router.get(
# "/all",
# response_model=TasksResult,
# status_code=status.HTTP_200_OK,
# summary="Retrieve All Task Statuses",
# description="Retrieve the statuses of all tasks available in the system.",
# )
async def get_all_tasks_status(
session: Session = Depends(get_db_session),
) -> TasksResult:
"""
Retrieve all tasks.
"""
return get_all_tasks_status_from_db(session=session)

0 comments on commit 4096b9a

Please sign in to comment.