diff --git a/front/src/applications/editor/tools/pointEdition/components.tsx b/front/src/applications/editor/tools/pointEdition/components.tsx index 9d3353d441c..281bef6bcf6 100644 --- a/front/src/applications/editor/tools/pointEdition/components.tsx +++ b/front/src/applications/editor/tools/pointEdition/components.tsx @@ -72,7 +72,7 @@ export const RoutesList = ({ type, id }: RoutesListProps) => { >({ type: 'idle' }); const { switchTool } = useContext(EditorContext) as ExtendedEditorContextType; const [getRoutesFromWaypoint] = - osrdEditoastApi.endpoints.getInfraByIdRoutesAndWaypointTypeWaypointId.useLazyQuery(); + osrdEditoastApi.endpoints.getInfraByInfraIdRoutesAndWaypointTypeWaypointId.useLazyQuery(); useEffect(() => { if (routesState.type === 'idle' && infraID) { @@ -80,7 +80,7 @@ export const RoutesList = ({ type, id }: RoutesListProps) => { setRoutesState({ type: 'error', message: `${type} elements are not valid waypoints.` }); } else { setRoutesState({ type: 'loading' }); - getRoutesFromWaypoint({ id: infraID, waypointType: type, waypointId: id }) + getRoutesFromWaypoint({ infraId: infraID, waypointType: type, waypointId: id }) .unwrap() .then(({ starting = [], ending = [] }) => { if (starting.length || ending.length) { diff --git a/front/src/applications/editor/tools/routeEdition/utils.ts b/front/src/applications/editor/tools/routeEdition/utils.ts index 08022cc58a3..7874affcbea 100644 --- a/front/src/applications/editor/tools/routeEdition/utils.ts +++ b/front/src/applications/editor/tools/routeEdition/utils.ts @@ -144,9 +144,9 @@ async function getRouteGeometryByRoute( dispatch: Dispatch ): Promise> { const trackRangesResult = await dispatch( - osrdEditoastApi.endpoints.getInfraByIdRoutesTrackRanges.initiate({ - id: infra as number, - routes: [route.properties.id], + osrdEditoastApi.endpoints.getInfraByInfraIdRoutesTrackRanges.initiate({ + infraId: infra as number, + routes: route.properties.id, }) ).unwrap(); if (trackRangesResult.length === 0 || trackRangesResult[0].type !== 'Computed') {