Replace deprecated forkJoin
MODIFY
src/app/components/admin/services/admin.service.ts
src/app/components/admin/services/admin.service.ts
@@ -78,7 +78,7 @@ export class AdminService {
// 2. insert developer to API-Mgmt
return insertToApiMgmt.pipe(mergeMap(insertedDeveloper => {
// 3. add devPortal group and add client role to keycloak user
- return forkJoin(addDevPortalGroupToUser(insertedKeycloakUser), addClientRoleToUser(insertedKeycloakUser, insertedDeveloper))
+ return forkJoin([addDevPortalGroupToUser(insertedKeycloakUser), addClientRoleToUser(insertedKeycloakUser, insertedDeveloper)])
.pipe(map(() => insertedDeveloper),
catchError((err, caught) => {
// rollback developer if keycloak settings cannot be done
@@ -119,11 +119,11 @@ export class AdminService {
* @param developer the developer to update
*/
public deleteDeveloper(developer: Developer) {
- return forkJoin(
+ return forkJoin([
this.deleteDeveloperFromApiMgmt(developer.id),
this.keycloak.deleteClientRole(developer.id),
this.keycloak.deleteUser(developer.name)
- );
+ ]);
}
/**

MODIFY
src/app/components/developer/api-list/api-list.component.ts
src/app/components/developer/api-list/api-list.component.ts
@@ -72,10 +72,10 @@ export class ApiListComponent implements OnChanges {
/**
* An observer to get all developer data from api data service
*/
- getDeveloperData: (developer: string) => Observable<ApiListElement> = (developer: string) => forkJoin(this.apiDataService.getDeveloperClients(developer),
+ getDeveloperData: (developer: string) => Observable<ApiListElement> = (developer: string) => forkJoin([this.apiDataService.getDeveloperClients(developer),
this.apiDataService.getDeveloperContracts(developer),
this.apiDataService.getDeveloperApis(developer),
- this.getGatewayDataObservable)
+ this.getGatewayDataObservable])
.pipe(mergeMap(forkedData => {
const [clients, contracts, apiVersions, gateways] = forkedData;
this.checkReceivedData(clients, contracts, apiVersions, gateways);

Replace deprecated forkJoin