mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-437] Update Download UI to use direct access when enabled (#2321)
* [ACS-437] Update Download UI to use direct access when enabled * Refactor * Add unit tests * Refactor by adding separate service * Moved unit tests to ContentUrlService instead of DownloadEffects * Move import in app.module.ts * Fixed review comments * npm install * Fix lint error
This commit is contained in:
committed by
Denys Vuika
parent
26f1cd84ba
commit
882f9de392
@@ -51,7 +51,9 @@ import {
|
||||
SitesApi,
|
||||
SearchApi,
|
||||
PeopleApi,
|
||||
VersionsApi
|
||||
VersionsApi,
|
||||
DirectAccessUrlEntry,
|
||||
VersionPaging
|
||||
} from '@alfresco/js-api';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
@@ -344,11 +346,19 @@ export class ContentApiService {
|
||||
);
|
||||
}
|
||||
|
||||
unlockNode(nodeId: string, opts?: any) {
|
||||
unlockNode(nodeId: string, opts?: any): Promise<MinimalNodeEntity> {
|
||||
return this.nodesApi.unlockNode(nodeId, opts);
|
||||
}
|
||||
|
||||
getNodeVersions(nodeId: string, opts?: any) {
|
||||
getNodeVersions(nodeId: string, opts?: any): Observable<VersionPaging> {
|
||||
return from(this.versionsApi.listVersionHistory(nodeId, opts));
|
||||
}
|
||||
|
||||
requestNodeDirectAccessUrl(nodeId: string): Observable<DirectAccessUrlEntry> {
|
||||
return from(this.nodesApi.requestDirectAccessUrl(nodeId));
|
||||
}
|
||||
|
||||
requestVersionDirectAccessUrl(nodeId: string, versionId: string): Observable<DirectAccessUrlEntry> {
|
||||
return from(this.versionsApi.requestDirectAccessUrl(nodeId, versionId));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user