diff --git a/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.spec.ts index c56b8fdf0c..f499147241 100644 --- a/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.spec.ts @@ -31,9 +31,7 @@ describe('AppsProcessCloudService', () => { let apiService: AlfrescoApiService; const apiMock: any = { - oauth2Auth: { - callCustomApi: () => Promise.resolve({list : { entries: [ {entry: fakeApplicationInstance[0]}, {entry: fakeApplicationInstance[1]}] }}) - }, + callCustomApiWithoutAuth: () => Promise.resolve({list : { entries: [ {entry: fakeApplicationInstance[0]}, {entry: fakeApplicationInstance[1]}] }}), isEcmLoggedIn: () => false, reply: jasmine.createSpy('reply') }; diff --git a/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.ts b/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.ts index 42b70509cc..ba2ace4a1d 100644 --- a/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.ts +++ b/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.ts @@ -19,7 +19,7 @@ import { Injectable } from '@angular/core'; import { Observable, from, throwError, of } from 'rxjs'; import { map, catchError } from 'rxjs/operators'; import { AlfrescoApiService, AppConfigService, LogService } from '@alfresco/adf-core'; -import { Oauth2Auth } from '@alfresco/js-api'; +import { AlfrescoApi } from '@alfresco/js-api'; import { ApplicationInstanceModel } from '../models/application-instance.model'; @Injectable({ providedIn: 'root' }) @@ -62,7 +62,7 @@ export class AppsProcessCloudService { if (status === '') { return of([]); } - const api: Oauth2Auth = this.apiService.getInstance().oauth2Auth; + const api: AlfrescoApi = this.apiService.getInstance(); const path = this.getApplicationUrl(); const pathParams = {}; const queryParams = { status, roles : role, sort: 'name' }; @@ -72,7 +72,7 @@ export class AppsProcessCloudService { const contentTypes = ['application/json']; const accepts = ['application/json']; - return from(api.callCustomApi(path, 'GET', pathParams, queryParams, headerParams, formParams, bodyParam, + return from(api.callCustomApiWithoutAuth(path, 'GET', pathParams, queryParams, headerParams, formParams, bodyParam, contentTypes, accepts)) .pipe( map((applications: any) => applications.list.entries.map((application) => application.entry)),