mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-28 00:56:26 +00:00
fix: dataset select cannot refresh (#3032)
* fix: dataset select cannot refresh * update cors
This commit is contained in:
@@ -84,8 +84,7 @@ async function handler(req: ApiRequestProps<ListAppBody>): Promise<AppListItemTy
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
teamId,
|
teamId,
|
||||||
...(type && Array.isArray(type) && { type: { $in: type } }),
|
...(type && (Array.isArray(type) ? { type: { $in: type } } : { type })),
|
||||||
...(type && { type }),
|
|
||||||
...parseParentIdInMongo(parentId)
|
...parseParentIdInMongo(parentId)
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
@@ -5,9 +5,10 @@ import { MongoChatItem } from '@fastgpt/service/core/chat/chatItemSchema';
|
|||||||
import { UpdateChatFeedbackProps } from '@fastgpt/global/core/chat/api';
|
import { UpdateChatFeedbackProps } from '@fastgpt/global/core/chat/api';
|
||||||
import { authChatCrud } from '@/service/support/permission/auth/chat';
|
import { authChatCrud } from '@/service/support/permission/auth/chat';
|
||||||
import { ReadPermissionVal } from '@fastgpt/global/support/permission/constant';
|
import { ReadPermissionVal } from '@fastgpt/global/support/permission/constant';
|
||||||
|
import { NextAPI } from '@/service/middleware/entry';
|
||||||
|
|
||||||
/* 初始化我的聊天框,需要身份验证 */
|
/* 初始化我的聊天框,需要身份验证 */
|
||||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||||
const {
|
const {
|
||||||
appId,
|
appId,
|
||||||
chatId,
|
chatId,
|
||||||
@@ -66,3 +67,5 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default NextAPI(handler);
|
||||||
|
@@ -327,7 +327,7 @@ const SettingQuotePrompt = (props: RenderInputProps) => {
|
|||||||
{isOpen && <EditModal {...props} onClose={onClose} />}
|
{isOpen && <EditModal {...props} onClose={onClose} />}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}, [isOpen, onClose, onOpen, t]);
|
}, [isOpen, onClose, onOpen, props, t]);
|
||||||
|
|
||||||
return Render;
|
return Render;
|
||||||
};
|
};
|
||||||
|
@@ -274,6 +274,7 @@ function List() {
|
|||||||
</HStack>
|
</HStack>
|
||||||
)}
|
)}
|
||||||
<PermissionIconText
|
<PermissionIconText
|
||||||
|
flexShrink={0}
|
||||||
private={dataset.private}
|
private={dataset.private}
|
||||||
iconColor="myGray.400"
|
iconColor="myGray.400"
|
||||||
color={'myGray.500'}
|
color={'myGray.500'}
|
||||||
@@ -281,7 +282,7 @@ function List() {
|
|||||||
</HStack>
|
</HStack>
|
||||||
|
|
||||||
<HStack>
|
<HStack>
|
||||||
{isPc && (
|
{isPc && dataset.type !== DatasetTypeEnum.folder && (
|
||||||
<HStack spacing={1} className="time">
|
<HStack spacing={1} className="time">
|
||||||
<Avatar src={dataset.vectorModel.avatar} w={'0.85rem'} />
|
<Avatar src={dataset.vectorModel.avatar} w={'0.85rem'} />
|
||||||
<Box color={'myGray.500'} fontSize={'mini'}>
|
<Box color={'myGray.500'} fontSize={'mini'}>
|
||||||
|
Reference in New Issue
Block a user