perf: password check;perf: image upload check;perf: sso login check (#3509)

* perf: password check

* perf: image upload check

* perf: sso login check
This commit is contained in:
Archer
2025-01-01 20:54:06 +08:00
committed by archer
parent c3480b0ffa
commit 3412d7009d
56 changed files with 501 additions and 564 deletions

View File

@@ -17,6 +17,7 @@ import { mongoSessionRun } from '../../../common/mongo/sessionRun';
import { DefaultGroupName } from '@fastgpt/global/support/user/team/group/constant';
import { getAIApi, openaiBaseUrl } from '../../../core/ai/config';
import { createRootOrg } from '../../permission/org/controllers';
import { refreshSourceAvatar } from '../../../common/file/image/controller';
async function getTeamMember(match: Record<string, any>): Promise<TeamTmbItemType> {
const tmb = await MongoTeamMember.findOne(match).populate<{ team: TeamSchema }>('team').lean();
@@ -218,7 +219,8 @@ export async function updateTeam({
return obj;
})();
await MongoTeam.findByIdAndUpdate(
// This is where we get the old team
const team = await MongoTeam.findByIdAndUpdate(
teamId,
{
$set: {
@@ -244,6 +246,8 @@ export async function updateTeam({
},
{ session }
);
await refreshSourceAvatar(avatar, team?.avatar, session);
}
});
}