fix: cannot save the system model setting #468 (#508)

### What problem does this PR solve?

fix: cannot save the system model setting #468
feat: rename file in FileManager
feat: add FileManager
feat: override useSelector type

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-04-23 17:46:56 +08:00
committed by GitHub
parent aa71462a9f
commit 6405041b4d
22 changed files with 990 additions and 70 deletions

View File

@ -0,0 +1,36 @@
import api from '@/utils/api';
import registerServer from '@/utils/registerServer';
import request from '@/utils/request';
const { listFile, removeFile, uploadFile, renameFile, getAllParentFolder } =
api;
const methods = {
listFile: {
url: listFile,
method: 'get',
},
removeFile: {
url: removeFile,
method: 'post',
},
uploadFile: {
url: uploadFile,
method: 'post',
},
renameFile: {
url: renameFile,
method: 'post',
},
getAllParentFolder: {
url: getAllParentFolder,
method: 'get',
},
} as const;
const fileManagerService = registerServer<keyof typeof methods>(
methods,
request,
);
export default fileManagerService;