mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 20:58:12 +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:
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);
|
Reference in New Issue
Block a user