Files
cms_thermo_active/Step/wwwroot/src/services/fileService.ts
T
2018-07-30 18:00:59 +02:00

24 lines
615 B
TypeScript

import { baseRestService } from "src/_base/baseRestService";
export class FileService extends baseRestService {
BASE_URL = "api/file_manager/";
async getFiles(path: string): Promise<Array<any>> {
return await this.Get<any>(this.BASE_URL + "files", true, {
filePath: path
});
}
async getFileInfo(path: string) {
return await this.Get<any>(this.BASE_URL + "file/info", true, {
filePath: path
});
}
async activateProgram(path: string) {
return await this.Put<any>(this.BASE_URL + "file/info?filePath=" + path, null);
}
}
export const fileService = new FileService();