Skip to content

Commit

Permalink
remove endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
AitorAlgorta committed Feb 20, 2024
1 parent 7f5a894 commit ebdad81
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 8 additions & 5 deletions frontend/control-center/src/actions/connector/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ export const updateConnectorConfigurationAction = createAction(
export const getComponentsAction = createAction(GET_COMPONENTS, (components: Components) => components)<Components>();

export const getConnectorsConfiguration = () => (dispatch: Dispatch<any>) => {
// return HttpClientInstance.getComponents().then((response: Components) => {
// dispatch(getComponentsAction(response));
// return Promise.resolve(true);
// });
return Promise.resolve(true);
return HttpClientInstance.getComponents().then((response: Components) => {
console.log('response', response);
dispatch(getComponentsAction(response));
return Promise.resolve(true);
}).catch((error: any) => {
console.log('Error: ', error);
return Promise.reject(error);
});
};

export const updateConnectorConfiguration =
Expand Down
2 changes: 2 additions & 0 deletions frontend/control-center/src/httpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export const apiHostUrl = env.API_HOST ?? `${location.protocol + '//' + location

export const HttpClientInstance = new HttpClient(apiHostUrl, (error, loginUrl) => {
console.error(error);
console.log('loginUrl', loginUrl);
console.log('location.href', location.href);
if (location.href != loginUrl) {
location.replace(loginUrl);
}
Expand Down

0 comments on commit ebdad81

Please sign in to comment.