mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[ACS-7427] Process Services improvements and cleanup (#9664)
This commit is contained in:
@@ -39,7 +39,7 @@ export class AppsProcessService {
|
||||
* @returns The list of deployed apps
|
||||
*/
|
||||
getDeployedApplications(): Observable<AppDefinitionRepresentation[]> {
|
||||
return from(this.appsApi.getAppDefinitions()).pipe(map((response) => response.data));
|
||||
return from(this.appsApi.getAppDefinitions()).pipe(map((response) => response.data || []));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -49,16 +49,6 @@ export class AppsProcessService {
|
||||
* @returns The list of deployed apps
|
||||
*/
|
||||
getDeployedApplicationsByName(name: string): Observable<AppDefinitionRepresentation> {
|
||||
return from(this.appsApi.getAppDefinitions()).pipe(map((response) => response.data.find((app) => app.name === name)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the details for a specific app ID number.
|
||||
*
|
||||
* @param appId ID of the target app
|
||||
* @returns Details of the app
|
||||
*/
|
||||
getApplicationDetailsById(appId: number): Observable<AppDefinitionRepresentation> {
|
||||
return from(this.appsApi.getAppDefinitions()).pipe(map((response) => response.data.find((app) => app.id === appId)));
|
||||
return this.getDeployedApplications().pipe(map((response) => response.find((app) => app.name === name)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user