From 4096b9aefcd72d9d4e0e3e5d6fc56db314b55f1c Mon Sep 17 00:00:00 2001 From: jhj0517 <97279763+jhj0517@users.noreply.github.com> Date: Sun, 24 Nov 2024 19:48:10 +0900 Subject: [PATCH] Disable "all" endpoint --- backend/routers/task/router.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/backend/routers/task/router.py b/backend/routers/task/router.py index c6712b2..317c538 100644 --- a/backend/routers/task/router.py +++ b/backend/routers/task/router.py @@ -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, @@ -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) \ No newline at end of file