perf: notify account (#3515)

This commit is contained in:
Archer
2025-01-02 16:15:21 +08:00
committed by archer
parent 28710ac05b
commit 9abbc16036
10 changed files with 15 additions and 26 deletions

View File

@@ -80,13 +80,11 @@ export async function createDefaultTeam({
userId,
teamName = 'My Team',
avatar = '/icon/logo.svg',
balance,
session
}: {
userId: string;
teamName?: string;
avatar?: string;
balance?: number;
session: ClientSession;
}) {
// auth default team
@@ -103,7 +101,6 @@ export async function createDefaultTeam({
ownerId: userId,
name: teamName,
avatar,
balance,
createTime: new Date()
}
],
@@ -140,11 +137,6 @@ export async function createDefaultTeam({
return tmb;
} else {
console.log('default team exist', userId);
await MongoTeam.findByIdAndUpdate(tmb.teamId, {
$set: {
...(balance !== undefined && { balance })
}
});
}
}