mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
perf: member group (#4324)
* sync collection * remove lock * perf: member group
This commit is contained in:
@@ -55,6 +55,14 @@ async function getTeamMember(match: Record<string, any>): Promise<TeamTmbItemTyp
|
||||
};
|
||||
}
|
||||
|
||||
export const getTeamOwner = async (teamId: string) => {
|
||||
const tmb = await MongoTeamMember.findOne({
|
||||
teamId,
|
||||
role: TeamMemberRoleEnum.owner
|
||||
}).lean();
|
||||
return tmb;
|
||||
};
|
||||
|
||||
export async function getTmbInfoByTmbId({ tmbId }: { tmbId: string }) {
|
||||
if (!tmbId) {
|
||||
return Promise.reject('tmbId or userId is required');
|
||||
|
Reference in New Issue
Block a user