Skip to content

Commit

Permalink
Merge branch 'konveyor:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
wise-king-sullyman authored Oct 2, 2023
2 parents 680d833 + bc0fe72 commit b7056b4
Show file tree
Hide file tree
Showing 9 changed files with 392 additions and 262 deletions.
2 changes: 1 addition & 1 deletion client/src/app/api/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export interface BusinessService {
id: number;
name: string;
description?: string;
owner?: Stakeholder;
owner?: Ref;
}

export interface Stakeholder {
Expand Down
36 changes: 18 additions & 18 deletions client/src/app/api/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ export const deleteIdentity = (identity: Identity): AxiosPromise => {

// Axios direct

export const createApplication = (obj: Application): Promise<Application> =>
axios.post(`${APPLICATIONS}`, obj);
export const createApplication = (data: Application) =>
axios.post<Application>(`${APPLICATIONS}`, data);

export const deleteApplication = (id: number): Promise<Application> =>
axios.delete(`${APPLICATIONS}/${id}`);
Expand Down Expand Up @@ -618,27 +618,27 @@ export const updateStakeholderGroup = (
): Promise<StakeholderGroup> =>
axios.put(`${STAKEHOLDER_GROUPS}/${obj.id}`, obj);

// ---------------------------------------
// Business services
//
export const getBusinessServices = () =>
axios
.get<BusinessService[]>(BUSINESS_SERVICES)
.then((response) => response.data);

export const getBusinessServices = (): Promise<BusinessService[]> =>
axios.get(BUSINESS_SERVICES).then((response) => response.data);

export const deleteBusinessService = (
id: number | string
): Promise<BusinessService> => axios.delete(`${BUSINESS_SERVICES}/${id}`);
export const getBusinessServiceById = (id: number | string) =>
axios
.get<BusinessService>(`${BUSINESS_SERVICES}/${id}`)
.then((response) => response.data);

export const createBusinessService = (
obj: New<BusinessService>
): Promise<BusinessService> => axios.post(BUSINESS_SERVICES, obj);
export const createBusinessService = (obj: New<BusinessService>) =>
axios.post<BusinessService>(BUSINESS_SERVICES, obj);

export const updateBusinessService = (
obj: BusinessService
): Promise<BusinessService> => axios.put(`${BUSINESS_SERVICES}/${obj.id}`, obj);
export const updateBusinessService = (obj: BusinessService) =>
axios.put<void>(`${BUSINESS_SERVICES}/${obj.id}`, obj);

export const getBusinessServiceById = (
id: number | string
): Promise<BusinessService> =>
axios.get(`${BUSINESS_SERVICES}/${id}`).then((response) => response.data);
export const deleteBusinessService = (id: number | string) =>
axios.delete<void>(`${BUSINESS_SERVICES}/${id}`);

// Job functions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const AnalysisWizard: React.FC<IAnalysisWizard> = ({
hasExcludedPackages: false,
associatedCredentials: "",
rulesKind: "manual",
repositoryType: "",
repositoryType: undefined,
sourceRepository: "",
branch: "",
rootPath: "",
Expand Down
Loading

0 comments on commit b7056b4

Please sign in to comment.