mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-30 02:12:38 +00:00
Context extract support value type (#1620)
* perf: chat box components * perf: chatbox context * feat: extract support value type * workflow performance * update doc * feat: error response * feat: error response * oauth sort * perf: logo * fix: update laf account * perf: team permission api * update type
This commit is contained in:
@@ -59,7 +59,7 @@ const UsageTable = () => {
|
||||
const [selectTmbId, setSelectTmbId] = useState(userInfo?.team?.tmbId);
|
||||
const { data: members = [] } = useQuery(['getMembers', userInfo?.team?.teamId], () => {
|
||||
if (!userInfo?.team?.teamId) return [];
|
||||
return getTeamMembers(userInfo.team.teamId);
|
||||
return getTeamMembers();
|
||||
});
|
||||
const tmbList = useMemo(
|
||||
() =>
|
||||
|
21
projects/app/src/pages/api/support/user/team/update.ts
Normal file
21
projects/app/src/pages/api/support/user/team/update.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { ApiRequestProps, ApiResponseType } from '@fastgpt/service/type/next';
|
||||
import { NextAPI } from '@/service/middleware/entry';
|
||||
import { UpdateTeamProps } from '@fastgpt/global/support/user/team/controller';
|
||||
import { authTeamOwner } from '@fastgpt/service/support/permission/auth/user';
|
||||
import { updateTeam } from '@fastgpt/service/support/user/team/controller';
|
||||
|
||||
export type updateQuery = {};
|
||||
|
||||
export type updateBody = {};
|
||||
|
||||
export type updateResponse = {};
|
||||
|
||||
async function handler(req: ApiRequestProps<updateBody, updateQuery>, res: ApiResponseType<any>) {
|
||||
const body = req.body as UpdateTeamProps;
|
||||
|
||||
const { teamId } = await authTeamOwner({ req, authToken: true });
|
||||
|
||||
await updateTeam({ teamId, ...body });
|
||||
}
|
||||
|
||||
export default NextAPI(handler);
|
@@ -26,13 +26,13 @@ const FormLayout = ({ children, setPageType, pageType }: Props) => {
|
||||
const redirectUri = `${location.origin}/login/provider`;
|
||||
|
||||
const oAuthList = [
|
||||
...(feConfigs?.oauth?.github
|
||||
...(feConfigs?.oauth?.wechat && pageType !== LoginPageTypeEnum.wechat
|
||||
? [
|
||||
{
|
||||
label: t('support.user.login.Github'),
|
||||
provider: OAuthEnum.github,
|
||||
icon: 'common/gitFill',
|
||||
redirectUrl: `https://github.com/login/oauth/authorize?client_id=${feConfigs?.oauth?.github}&redirect_uri=${redirectUri}&state=${state.current}&scope=user:email%20read:user`
|
||||
label: t('support.user.login.Wechat'),
|
||||
provider: OAuthEnum.wechat,
|
||||
icon: 'common/wechatFill',
|
||||
pageType: LoginPageTypeEnum.wechat
|
||||
}
|
||||
]
|
||||
: []),
|
||||
@@ -46,13 +46,13 @@ const FormLayout = ({ children, setPageType, pageType }: Props) => {
|
||||
}
|
||||
]
|
||||
: []),
|
||||
...(feConfigs?.oauth?.wechat && pageType !== LoginPageTypeEnum.wechat
|
||||
...(feConfigs?.oauth?.github
|
||||
? [
|
||||
{
|
||||
label: t('support.user.login.Wechat'),
|
||||
provider: OAuthEnum.wechat,
|
||||
icon: 'common/wechatFill',
|
||||
pageType: LoginPageTypeEnum.wechat
|
||||
label: t('support.user.login.Github'),
|
||||
provider: OAuthEnum.github,
|
||||
icon: 'common/gitFill',
|
||||
redirectUrl: `https://github.com/login/oauth/authorize?client_id=${feConfigs?.oauth?.github}&redirect_uri=${redirectUri}&state=${state.current}&scope=user:email%20read:user`
|
||||
}
|
||||
]
|
||||
: []),
|
||||
|
Reference in New Issue
Block a user