Skip to content
Snippets Groups Projects
Commit a9130ebe authored by Zoltan Runyo's avatar Zoltan Runyo
Browse files

ICSHWI-9534: Update manage IOC endpoints

parent 1503d048
No related branches found
No related tags found
4 merge requests!270Merging develop branch to master in order to create RC,!222Fixing missing time interval parameter for logs,!202Merging develop to master,!183Icshwi 9534 manage ioc endpoints
......@@ -6,7 +6,7 @@ Given('the user is not authenticated', () => {
cy.clearCookies();
cy.request({
url: baseUrl+'/api/v1/getHelper/userInfo',
url: baseUrl+'/api/v1/get_helper/user_info',
failOnStatusCode: false
})
.should((response) => {
......
......@@ -24,7 +24,7 @@ defineFeature(feature, (test) => {
// let's set a handler which returns 401 "Unauthorized" when fetching userInfo
// this is one of the first pieces of info the app tries to fetch
server.use(
rest.get("*/api/v1/gitHelper/userInfo", (req, res, ctx) => {
rest.get("*/api/v1/git_helper/user_info", (req, res, ctx) => {
return res(ctx.status(401));
})
)
......
......@@ -426,7 +426,7 @@ export function useCommandJob(awxCommandId) {
export function useUpdateAndDeployIoc(id, onError) {
const api = useContext(apiContext);
const method = useCallAndUnpack(
body => api.apis.Deployments.updateAndDeployIoc({ ioc_id: id }, { requestBody: body }),
body => api.apis.IOCs.updateAndDeployIoc({ ioc_id: id }, { requestBody: body }),
unpackDeployment
);
return useAsync({ fcn: method, call: false, onError: onError });
......@@ -435,7 +435,7 @@ export function useUpdateAndDeployIoc(id, onError) {
export function useCreateUndeployment(id, onError) {
const api = useContext(apiContext);
const method = useCallAndUnpack(
body => api.apis.Deployments.createUndeployment({ioc_id: id}, { requestBody: body }),
body => api.apis.IOCs.createUndeployment({ioc_id: id}, { requestBody: body }),
unpackDeployment
);
return useAsync({ fcn: method, call: false, onError: onError });
......@@ -615,14 +615,14 @@ export function useLogout() {
export function useStartIOC(id, onError) {
const api = useContext(apiContext);
const method = useCallAndUnpack(api.apis.Deployments.startIoc);
const method = useCallAndUnpack(api.apis.IOCs.startIoc);
const boundMethod = useCallback(method.bind(null, {ioc_id: id}), [id])
return useAsync({ fcn: boundMethod, call: false, onError: onError });
}
export function useStopIOC(id, onError) {
const api = useContext(apiContext);
const method = useCallAndUnpack(api.apis.Deployments.stopIoc);
const method = useCallAndUnpack(api.apis.IOCs.stopIoc);
const boundMethod = useCallback(method.bind(null, {ioc_id: id}), [id])
return useAsync({ fcn: boundMethod, call: false, onError: onError });
}
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment