mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 13:53:50 +00:00
fix: invite link (#4229)
* fix: invite link * feat: create invite link and copy it directly
This commit is contained in:
@@ -32,3 +32,32 @@ export async function getRootUser(): Promise<parseHeaderCertRet> {
|
||||
tmbId: tmb?._id
|
||||
};
|
||||
}
|
||||
|
||||
export async function getUser(username: string): Promise<parseHeaderCertRet> {
|
||||
const user = await MongoUser.create({
|
||||
username,
|
||||
password: '123456'
|
||||
});
|
||||
|
||||
const team = await MongoTeam.create({
|
||||
name: 'test team',
|
||||
ownerId: user._id
|
||||
});
|
||||
|
||||
const tmb = await MongoTeamMember.create({
|
||||
teamId: team._id,
|
||||
userId: user._id,
|
||||
status: 'active'
|
||||
});
|
||||
|
||||
return {
|
||||
userId: user._id,
|
||||
apikey: '',
|
||||
appId: '',
|
||||
authType: AuthUserTypeEnum.token,
|
||||
isRoot: false,
|
||||
sourceName: undefined,
|
||||
teamId: tmb?.teamId,
|
||||
tmbId: tmb?._id
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user