[ACA-3669] Incorrect Version Number Displayed (#2281)

* [ACA-3669] Incorrect Version Number Displayed

* * fixed lint

* * test fixed
This commit is contained in:
Dharan
2021-09-06 11:00:45 +05:30
committed by GitHub
parent 8afedd6e1f
commit 65826c27f6
6 changed files with 82 additions and 75 deletions

View File

@@ -50,7 +50,8 @@ import {
ContentApi,
SitesApi,
SearchApi,
PeopleApi
PeopleApi,
VersionsApi
} from '@alfresco/js-api';
import { map } from 'rxjs/operators';
@@ -112,6 +113,11 @@ export class ContentApiService {
return this._peopleApi;
}
_versionsApi: VersionsApi;
get versionsApi(): VersionsApi {
this._versionsApi = this._versionsApi ?? new VersionsApi(this.api.getInstance());
return this._versionsApi;
}
constructor(private api: AlfrescoApiService, private preferences: UserPreferencesService) {}
/**
@@ -341,4 +347,8 @@ export class ContentApiService {
unlockNode(nodeId: string, opts?: any) {
return this.nodesApi.unlockNode(nodeId, opts);
}
getNodeVersions(nodeId: string, opts?: any) {
return from(this.versionsApi.listVersionHistory(nodeId, opts));
}
}