[ACS-7600] fix Hold interface and documentation

This commit is contained in:
tamaragruszka
2024-08-09 16:20:28 +02:00
committed by Darya Blavanovich
parent 6d6ef29c73
commit 8a91945d0a
8 changed files with 35 additions and 42 deletions

View File

@@ -43,10 +43,7 @@ export class NodesApiService {
return this._nodesApi;
}
constructor(
private apiService: AlfrescoApiService,
private preferences: UserPreferencesService
) {}
constructor(private apiService: AlfrescoApiService, private preferences: UserPreferencesService) {}
private getEntryFromEntity(entity: NodeEntry): Node {
return entity.entry;
@@ -190,10 +187,13 @@ export class NodesApiService {
return from(this.nodesApi.listParents(nodeId, queryOptions)).pipe(
map(({ list }) =>
list.entries?.map(({ entry }) => ({
id: entry.id,
name: entry.name
}))
list.entries?.map(
({ entry }) =>
({
id: entry.id,
name: entry.name
} as Hold)
)
)
);
}

View File

@@ -41,14 +41,7 @@ export class LegalHoldService {
* @returns List of holds Observable<Hold[]>
*/
getHolds(filePlanId: string, options?: ContentPagingQuery): Observable<Hold[]> {
return from(this.legalHoldApi.getHolds(filePlanId, options)).pipe(
map(({ list }) =>
list.entries?.map(({ entry }) => ({
id: entry.id,
name: entry.name
}))
)
);
return from(this.legalHoldApi.getHolds(filePlanId, options)).pipe(map(({ list }) => list.entries?.map(({ entry }) => entry)));
}
/**