mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 06:46:40 +08:00
Unified API response json schema (#3170)
### What problem does this PR solve? Unified API response json schema ### Type of change - [x] Refactoring
This commit is contained in:
@ -141,8 +141,8 @@ export const useHandleDeleteFile = (
|
||||
const handleRemoveFile = () => {
|
||||
showDeleteConfirm({
|
||||
onOk: async () => {
|
||||
const retcode = await removeDocument({ fileIds, parentId });
|
||||
if (retcode === 0) {
|
||||
const code = await removeDocument({ fileIds, parentId });
|
||||
if (code === 0) {
|
||||
setSelectedRowKeys([]);
|
||||
}
|
||||
return;
|
||||
|
||||
@ -22,7 +22,7 @@ const AsyncTreeSelect = ({ value, onChange }: IProps) => {
|
||||
const onLoadData: TreeSelectProps['loadData'] = useCallback(
|
||||
async ({ id }) => {
|
||||
const ret = await fetchList(id);
|
||||
if (ret.retcode === 0) {
|
||||
if (ret.code === 0) {
|
||||
setTreeData((tree) => {
|
||||
return tree.concat(
|
||||
ret.data.files
|
||||
|
||||
Reference in New Issue
Block a user