mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-04 21:14:13 +08:00
30 lines
910 B
Go
30 lines
910 B
Go
import { File } from '@/api/interface/file';
|
|
import http from '@/api';
|
|
|
|
export const GetFilesList = (params: File.ReqFile) => {
|
|
return http.post<File.File>('files/search', params);
|
|
};
|
|
|
|
export const GetFilesTree = (params: File.ReqFile) => {
|
|
return http.post<File.FileTree[]>('files/tree', params);
|
|
};
|
|
|
|
export const CreateFile = (form: File.FileCreate) => {
|
|
return http.post<File.File>('files', form);
|
|
};
|
|
|
|
export const DeleteFile = (form: File.FileDelete) => {
|
|
return http.post<File.File>('files/del', form);
|
|
};
|
|
|
|
export const ChangeFileMode = (form: File.FileCreate) => {
|
|
return http.post<File.FileCreate>('files/mode', form);
|
|
};
|
|
|
|
export const CompressFile = (form: File.FileCompress) => {
|
|
return http.post<File.FileCompress>('files/compress', form);
|
|
};
|
|
export const DeCompressFile = (form: File.FileDeCompress) => {
|
|
return http.post<File.FileCompress>('files/decompress', form);
|
|
};
|