mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-5992] refactor api wrappers (#3425)
* [ACS-5992] refactor api wrappers * code review fixes * review siteVisibility fix * deleting configs from index * updating breadcrumb preconditions
This commit is contained in:
@@ -24,21 +24,17 @@
|
||||
|
||||
import * as fs from 'fs';
|
||||
import { ApiClientFactory } from './api-client-factory';
|
||||
import { users } from '../base-config/global-variables';
|
||||
|
||||
export class FileActionsApi extends ApiClientFactory {
|
||||
export class FileActionsApi {
|
||||
private apiService: ApiClientFactory;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.apiService = new ApiClientFactory();
|
||||
}
|
||||
|
||||
static async initialize(
|
||||
userProfile: keyof typeof users
|
||||
): Promise<FileActionsApi> {
|
||||
static async initialize(userName: string, password?: string): Promise<FileActionsApi> {
|
||||
const classObj = new FileActionsApi();
|
||||
await classObj.apiService.setUpAcaBackend(userProfile);
|
||||
await classObj.apiService.setUpAcaBackend(userName, password);
|
||||
return classObj;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user