From cf8550f2a8331f8c5ac56bb62a465dfd6ed11382 Mon Sep 17 00:00:00 2001 From: Sujan Adhikari Date: Thu, 28 Nov 2024 13:56:06 +0545 Subject: [PATCH] fix: resolve route ambiguity for /tasks/activity endpoint --- src/backend/app/tasks/task_routes.py | 2 +- src/frontend/src/views/ProjectSubmissions.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/app/tasks/task_routes.py b/src/backend/app/tasks/task_routes.py index e2dd110b63..dd8a3a6ed7 100644 --- a/src/backend/app/tasks/task_routes.py +++ b/src/backend/app/tasks/task_routes.py @@ -84,7 +84,7 @@ async def add_new_task_event( return await DbTaskEvent.create(db, new_event) -@router.get("/activity", response_model=list[task_schemas.TaskEventCount]) +@router.get("/activity/", response_model=list[task_schemas.TaskEventCount]) async def task_activity( project_id: int, db: Annotated[Connection, Depends(db_conn)], diff --git a/src/frontend/src/views/ProjectSubmissions.tsx b/src/frontend/src/views/ProjectSubmissions.tsx index 7782e183df..172bb94890 100644 --- a/src/frontend/src/views/ProjectSubmissions.tsx +++ b/src/frontend/src/views/ProjectSubmissions.tsx @@ -53,7 +53,7 @@ const ProjectSubmissions = () => { useEffect(() => { dispatch( - MappedVsValidatedTaskService(`${import.meta.env.VITE_API_URL}/tasks/activity?project_id=${projectId}&days=30`), + MappedVsValidatedTaskService(`${import.meta.env.VITE_API_URL}/tasks/activity/?project_id=${projectId}&days=30`), ); }, []);