Skip to content

Commit

Permalink
Revert changes to /environment/{namespace}/{environment} endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
peytondmurray committed Jan 22, 2025
1 parent 8693acb commit adeec7a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/features/environmentDetails/environmentDetailsApiSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const environmentDetailsApiSlice = apiSlice.injectEndpoints({
}),
updateBuildId: builder.mutation({
query: ({ namespace, environment, buildId }) => ({
url: `/api/v2/environment/${namespace}/${environment}/`,
url: `/api/v1/environment/${namespace}/${environment}/`,
method: "PUT",
body: {
build_id: buildId
Expand All @@ -26,7 +26,7 @@ export const environmentDetailsApiSlice = apiSlice.injectEndpoints({
}),
deleteEnvironment: builder.mutation({
query: ({ namespace, environment }) => ({
url: `/api/v2/environment/${namespace}/${environment}/`,
url: `/api/v1/environment/${namespace}/${environment}/`,
method: "DELETE"
})
})
Expand Down
1 change: 0 additions & 1 deletion src/features/environments/components/Environments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const BaseEnvironments = ({
const { palette } = useTheme();
const version: string = process.env.REACT_APP_VERSION as string;
const environmentsState = useAppSelector(state => state.environments);
// const environmentsState = useAppSelector(state => state.environments);
const namespacesState = useAppSelector(state => state.namespaces);

const dispatch = useAppDispatch();
Expand Down
2 changes: 1 addition & 1 deletion src/features/metadata/metadataApiSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const environmentsApiSlice = apiSlice.injectEndpoints({
query: environmentId => `/api/v1/build/${environmentId}/`
}),
getEnviroment: builder.query<IApiResponse<Build>, any>({
query: env => `/api/v2/environment/${env.namespace.name}/${env.name}/`
query: env => `/api/v1/environment/${env.namespace.name}/${env.name}/`
}),
getEnviromentBuilds: builder.query<IApiResponse<Build[]>, any>({
query: env =>
Expand Down

0 comments on commit adeec7a

Please sign in to comment.