24 lines
615 B
TypeScript
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();
|