mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
upgrade to latest JS-API and ADF (#896)
* improved update script and latest ADF libs * upgrade to latest js-api and ADF * upgrade tests * update viewer code * use @alfresco/js-api * update to latest adf * fix deprecation issues * update viewer * fix copy/move dialog * change expect * fix remove site from favorites * fix unit test * update adf version * use ADF upload dialog
This commit is contained in:
@@ -25,8 +25,10 @@
|
||||
|
||||
import { RepoApi } from '../repo-api';
|
||||
import { Utils } from '../../../../utilities/utils';
|
||||
import { SharedlinksApi as AdfSharedlinksApi } from '@alfresco/js-api';
|
||||
|
||||
export class SharedLinksApi extends RepoApi {
|
||||
sharedlinksApi = new AdfSharedlinksApi(this.alfrescoJsApi);
|
||||
|
||||
constructor(username?, password?) {
|
||||
super(username, password);
|
||||
@@ -39,7 +41,7 @@ export class SharedLinksApi extends RepoApi {
|
||||
nodeId: id,
|
||||
expiresAt: expireDate
|
||||
};
|
||||
return await this.alfrescoJsApi.core.sharedlinksApi.addSharedLink(data);
|
||||
return await this.sharedlinksApi.createSharedLink(data);
|
||||
} catch (error) {
|
||||
console.log('---- shareFileById error: ', error);
|
||||
}
|
||||
@@ -60,12 +62,12 @@ export class SharedLinksApi extends RepoApi {
|
||||
|
||||
async unshareFile(name: string) {
|
||||
const id = await this.getSharedIdOfNode(name);
|
||||
return await this.alfrescoJsApi.core.sharedlinksApi.deleteSharedLink(id);
|
||||
return await this.sharedlinksApi.deleteSharedLink(id);
|
||||
}
|
||||
|
||||
async getSharedLinks() {
|
||||
await this.apiAuth();
|
||||
return await this.alfrescoJsApi.core.sharedlinksApi.findSharedLinks();
|
||||
return await this.sharedlinksApi.listSharedLinks();
|
||||
}
|
||||
|
||||
async waitForApi(data) {
|
||||
|
Reference in New Issue
Block a user