mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-31 03:22:18 +00:00
4.8.5 test (#1805)
* perf: revert tip * feat: create copy app * perf: file stream read * perf: read directory over 100 files * perf: index * fix: team chat api error * lock * fix: i18n file
This commit is contained in:
@@ -55,6 +55,12 @@ export async function insertData2Dataset({
|
||||
|
||||
if (!indexes.find((index) => index.defaultIndex)) {
|
||||
indexes.unshift(getDefaultIndex({ q, a }));
|
||||
} else if (q && a && !indexes.find((index) => index.text === q)) {
|
||||
// push a q index
|
||||
indexes.push({
|
||||
defaultIndex: false,
|
||||
text: q
|
||||
});
|
||||
}
|
||||
|
||||
indexes = indexes.slice(0, 6);
|
||||
|
@@ -11,6 +11,7 @@ import { authOutLinkValid } from '@fastgpt/service/support/permission/publish/au
|
||||
import { AuthUserTypeEnum, ReadPermissionVal } from '@fastgpt/global/support/permission/constant';
|
||||
import { MongoTeamMember } from '@fastgpt/service/support/user/team/teamMemberSchema';
|
||||
import { OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
|
||||
import { addLog } from '@fastgpt/service/common/system/log';
|
||||
/*
|
||||
outLink: Must be the owner
|
||||
token: team owner and chat owner have all permissions
|
||||
@@ -55,6 +56,7 @@ export async function autChatCrud({
|
||||
// auth team space chat
|
||||
if (spaceTeamId && teamToken) {
|
||||
const { uid } = await authTeamSpaceToken({ teamId: spaceTeamId, teamToken });
|
||||
addLog.debug('Auth team token', { uid, spaceTeamId, teamToken, chatUid: chat.outLinkUid });
|
||||
if (!chat || (String(chat.teamId) === String(spaceTeamId) && chat.outLinkUid === uid)) {
|
||||
return { uid };
|
||||
}
|
||||
|
Reference in New Issue
Block a user