diff --git a/src/backend/app/central/central_crud.py b/src/backend/app/central/central_crud.py index d5ba3a2277..d7bff0b254 100644 --- a/src/backend/app/central/central_crud.py +++ b/src/backend/app/central/central_crud.py @@ -643,7 +643,7 @@ async def convert_odk_submission_json_to_geojson( if not submission_json: raise HTTPException( status_code=HTTPStatus.UNPROCESSABLE_ENTITY, - detail="Loading JSON submission failed", + detail="Project contains no submissions yet", ) all_features = [] diff --git a/src/backend/app/projects/project_routes.py b/src/backend/app/projects/project_routes.py index f0609bd837..afb7721b8f 100644 --- a/src/backend/app/projects/project_routes.py +++ b/src/backend/app/projects/project_routes.py @@ -442,7 +442,7 @@ async def delete_project( return Response(status_code=HTTPStatus.NO_CONTENT) -@router.post("/create_project", response_model=project_schemas.ProjectOut) +@router.post("/create-project", response_model=project_schemas.ProjectOut) async def create_project( project_info: project_schemas.ProjectUpload, org_user_dict: OrgUserDict = Depends(org_admin), diff --git a/src/backend/tests/test_projects_routes.py b/src/backend/tests/test_projects_routes.py index a218db05b6..66c363d143 100644 --- a/src/backend/tests/test_projects_routes.py +++ b/src/backend/tests/test_projects_routes.py @@ -75,7 +75,7 @@ async def test_create_project(client, admin_user, organisation): project_data.update(**odk_creds_models.model_dump()) response = client.post( - f"/projects/create_project?org_id={organisation.id}", json=project_data + f"/projects/create-project?org_id={organisation.id}", json=project_data ) if response.status_code != 200: diff --git a/src/frontend/src/components/createnewproject/SplitTasks.tsx b/src/frontend/src/components/createnewproject/SplitTasks.tsx index 80290ed8fa..1e6fa546ec 100644 --- a/src/frontend/src/components/createnewproject/SplitTasks.tsx +++ b/src/frontend/src/components/createnewproject/SplitTasks.tsx @@ -130,7 +130,7 @@ const SplitTasks = ({ flag, geojsonFile, setGeojsonFile, customDataExtractUpload dispatch( CreateProjectService( - `${import.meta.env.VITE_API_URL}/projects/create_project?org_id=${projectDetails.organisation_id}`, + `${import.meta.env.VITE_API_URL}/projects/create-project?org_id=${projectDetails.organisation_id}`, projectData, taskAreaGeojsonFile, customFormFile,