-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: Standardized interface name capitalization #7770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,87 +5,87 @@ import { ResPage } from '../interface'; | |
| import { TimeoutEnum } from '@/enums/http-enum'; | ||
| import { ReqPage } from '@/api/interface'; | ||
|
|
||
| export const GetFilesList = (params: File.ReqFile) => { | ||
| export const getFilesList = (params: File.ReqFile) => { | ||
| return http.post<File.File>('files/search', params, TimeoutEnum.T_5M); | ||
| }; | ||
|
|
||
| export const GetUploadList = (params: File.SearchUploadInfo) => { | ||
| export const getUploadList = (params: File.SearchUploadInfo) => { | ||
| return http.post<ResPage<File.UploadInfo>>('files/upload/search', params); | ||
| }; | ||
|
|
||
| export const GetFilesTree = (params: File.ReqFile) => { | ||
| export const getFilesTree = (params: File.ReqFile) => { | ||
| return http.post<File.FileTree[]>('files/tree', params); | ||
| }; | ||
|
|
||
| export const CreateFile = (form: File.FileCreate) => { | ||
| export const createFile = (form: File.FileCreate) => { | ||
| return http.post<File.File>('files', form); | ||
| }; | ||
|
|
||
| export const DeleteFile = (form: File.FileDelete) => { | ||
| export const deleteFile = (form: File.FileDelete) => { | ||
| return http.post<File.File>('files/del', form); | ||
| }; | ||
|
|
||
| export const BatchDeleteFile = (form: File.FileBatchDelete) => { | ||
| export const batchDeleteFile = (form: File.FileBatchDelete) => { | ||
| return http.post('files/batch/del', form); | ||
| }; | ||
|
|
||
| export const ChangeFileMode = (form: File.FileCreate) => { | ||
| export const changeFileMode = (form: File.FileCreate) => { | ||
| return http.post<File.File>('files/mode', form); | ||
| }; | ||
|
|
||
| export const CompressFile = (form: File.FileCompress) => { | ||
| export const compressFile = (form: File.FileCompress) => { | ||
| return http.post<File.File>('files/compress', form, TimeoutEnum.T_10M); | ||
| }; | ||
|
|
||
| export const DeCompressFile = (form: File.FileDeCompress) => { | ||
| export const deCompressFile = (form: File.FileDeCompress) => { | ||
| return http.post<File.File>('files/decompress', form, TimeoutEnum.T_10M); | ||
| }; | ||
|
|
||
| export const GetFileContent = (params: File.ReqFile) => { | ||
| export const getFileContent = (params: File.ReqFile) => { | ||
| return http.post<File.File>('files/content', params); | ||
| }; | ||
|
|
||
| export const SaveFileContent = (params: File.FileEdit) => { | ||
| export const saveFileContent = (params: File.FileEdit) => { | ||
| return http.post<File.File>('files/save', params); | ||
| }; | ||
|
|
||
| export const CheckFile = (path: string) => { | ||
| export const checkFile = (path: string) => { | ||
| return http.post<boolean>('files/check', { path: path }); | ||
| }; | ||
|
|
||
| export const UploadFileData = (params: FormData, config: AxiosRequestConfig) => { | ||
| export const uploadFileData = (params: FormData, config: AxiosRequestConfig) => { | ||
| return http.upload<File.File>('files/upload', params, config); | ||
| }; | ||
|
|
||
| export const ChunkUploadFileData = (params: FormData, config: AxiosRequestConfig) => { | ||
| export const chunkUploadFileData = (params: FormData, config: AxiosRequestConfig) => { | ||
| return http.upload<File.File>('files/chunkupload', params, config); | ||
| }; | ||
|
|
||
| export const RenameRile = (params: File.FileRename) => { | ||
| export const renameRile = (params: File.FileRename) => { | ||
| return http.post<File.File>('files/rename', params); | ||
| }; | ||
|
|
||
| export const ChangeOwner = (params: File.FileOwner) => { | ||
| export const changeOwner = (params: File.FileOwner) => { | ||
| return http.post<File.File>('files/owner', params); | ||
| }; | ||
|
|
||
| export const WgetFile = (params: File.FileWget) => { | ||
| export const wgetFile = (params: File.FileWget) => { | ||
| return http.post<File.FileWgetRes>('files/wget', params); | ||
| }; | ||
|
|
||
| export const MoveFile = (params: File.FileMove) => { | ||
| export const moveFile = (params: File.FileMove) => { | ||
| return http.post<File.File>('files/move', params, TimeoutEnum.T_5M); | ||
| }; | ||
|
|
||
| export const DownloadFile = (params: File.FileDownload) => { | ||
| export const downloadFile = (params: File.FileDownload) => { | ||
| return http.download<BlobPart>('files/download', params, { responseType: 'blob', timeout: TimeoutEnum.T_40S }); | ||
| }; | ||
|
|
||
| export const ComputeDirSize = (params: File.DirSizeReq) => { | ||
| export const computeDirSize = (params: File.DirSizeReq) => { | ||
| return http.post<File.DirSizeRes>('files/size', params, TimeoutEnum.T_5M); | ||
| }; | ||
|
|
||
| export const FileKeys = () => { | ||
| export const fileKeys = () => { | ||
| return http.get<File.FileKeys>('files/keys'); | ||
| }; | ||
|
|
||
|
|
@@ -101,30 +101,30 @@ export const clearRecycle = () => { | |
| return http.post<any>('files/recycle/clear'); | ||
| }; | ||
|
|
||
| export const SearchFavorite = (params: ReqPage) => { | ||
| export const searchFavorite = (params: ReqPage) => { | ||
| return http.post<ResPage<File.Favorite>>('files/favorite/search', params); | ||
| }; | ||
|
|
||
| export const AddFavorite = (path: string) => { | ||
| export const addFavorite = (path: string) => { | ||
| return http.post<any>('files/favorite', { path: path }); | ||
| }; | ||
|
|
||
| export const ReadByLine = (req: File.FileReadByLine) => { | ||
| export const readByLine = (req: File.FileReadByLine) => { | ||
| return http.post<any>('files/read', req); | ||
| }; | ||
|
|
||
| export const RemoveFavorite = (id: number) => { | ||
| export const removeFavorite = (id: number) => { | ||
| return http.post<any>('files/favorite/del', { id: id }); | ||
| }; | ||
|
|
||
| export const BatchChangeRole = (params: File.FileRole) => { | ||
| export const batchChangeRole = (params: File.FileRole) => { | ||
| return http.post<any>('files/batch/role', params); | ||
| }; | ||
|
|
||
| export const GetRecycleStatus = () => { | ||
| export const getRecycleStatus = () => { | ||
| return http.get<string>('files/recycle/status'); | ||
| }; | ||
|
|
||
| export const GetPathByType = (pathType: string) => { | ||
| export const getPathByType = (pathType: string) => { | ||
| return http.get<string>(`files/path/${pathType}`); | ||
| }; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code is for a web application that interacts with various APIs related to files, including uploading/downloading files, creating/moving/deleteing them etc. The difference between the two versions of the code includes minor changes like using camelCase instead of snake_case or typo error in For instance:
In summary, it seems these changes don't pose significant issues but can be improved through proper testing of the new version before integrating into the main project repository. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| import { Group } from '../interface/group'; | ||
| import http from '@/api'; | ||
|
|
||
| export const GetGroupList = (type: string) => { | ||
| export const getGroupList = (type: string) => { | ||
| return http.post<Array<Group.GroupInfo>>(`/core/groups/search`, { type: type }); | ||
| }; | ||
| export const CreateGroup = (params: Group.GroupCreate) => { | ||
| export const createGroup = (params: Group.GroupCreate) => { | ||
| return http.post<Group.GroupCreate>(`/core/groups`, params); | ||
| }; | ||
| export const UpdateGroup = (params: Group.GroupUpdate) => { | ||
| export const updateGroup = (params: Group.GroupUpdate) => { | ||
| return http.post(`/core/groups/update`, params); | ||
| }; | ||
| export const DeleteGroup = (id: number) => { | ||
| export const deleteGroup = (id: number) => { | ||
| return http.post(`/core/groups/del`, { id: id }); | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code has some slight discrepancies between the original version before merging and the current one. For example:
Original code:
Corrected code: